Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
Gate exchange can't get orders using app script

I run script in app script to get data from gate API by GET /spot/orders and work good but, if I change status open to finished return empty. you can see document from this URL: https://www.gate.io/docs/developers/apiv4/en/#list-orders.

this is code:

function orders() {
  const key = "*****";
  const secret = "*****";

  const host = "https://api.gateio.ws";
  const prefix = "/api/v4";
  const url = "/spot/orders";
  const method = "GET";
  const query_param = "currency_pair=BTC_USDT&status=open";

  const signature = gen_sign_(key, secret, method, prefix + url, query_param);
  const headers = { "Accept": "application/json", "Content-Type": "application/json", "muteHttpExceptions": true, ...signature };
  const res = UrlFetchApp.fetch(host + prefix + url + "?" + query_param , { method, headers });
  console.log(res.getContentText());
}

This code is work good and give me return of my open orders.

Problem linked by this code:

const query_param = "currency_pair=BTC_USDT&status=open";

If I change status=open to status=finished.

give me return empty just []

enter image description here

note: I have orders buy and sell in this pair.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda