Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!