diff --git a/examples/futures/getBalances.ts b/examples/futures/getBalances.ts index 19e7384..82942a2 100644 --- a/examples/futures/getBalances.ts +++ b/examples/futures/getBalances.ts @@ -18,8 +18,9 @@ async function getFuturesBalances() { console.log('Using API keys:', account); // Fetch the futures account balance for USDT settlement - const ticker = await gateRestClient.getFuturesAccount({ settle: 'usdt' }); - console.log('Response: ', ticker); // Log the response to the console + const result = await gateRestClient.getFuturesAccount({ settle: 'usdt' }); + + console.log('Response: ', result); // Log the response to the console } catch (e) { console.error(`Error in execution: `, e); // Log any errors that occur } diff --git a/examples/futures/getOrders.ts b/examples/futures/getOrders.ts index 6f1a41c..a2da624 100644 --- a/examples/futures/getOrders.ts +++ b/examples/futures/getOrders.ts @@ -18,18 +18,18 @@ async function getFuturesOrders() { console.log('Using API keys:', account); // Fetch open futures orders with USDT settlement - const orders = await gateRestClient.getFuturesOrders({ + const openOrders = await gateRestClient.getFuturesOrders({ settle: 'usdt', // Specify the settlement currency status: 'open', // Specify the status of the orders to fetch }); - console.log('Response: ', orders); // Log the response to the console + console.log('openOrders: ', openOrders); // Log the response to the console // Fetch finished futures orders with USDT settlement - const orders1 = await gateRestClient.getFuturesOrders({ + const finishedOrders = await gateRestClient.getFuturesOrders({ settle: 'usdt', // Specify the settlement currency status: 'finished', // Specify the status of the orders to fetch }); - console.log('Response: ', orders1); // Log the response to the console + console.log('finishedOrders: ', finishedOrders); // Log the response to the console } catch (e) { console.error(`Error in execution: `, e); // Log any errors that occur } diff --git a/examples/futures/getTickers.ts b/examples/futures/getTickers.ts index 5a19e1d..7806f93 100644 --- a/examples/futures/getTickers.ts +++ b/examples/futures/getTickers.ts @@ -21,14 +21,14 @@ async function getFuturesTicker() { const allTickers = await gateRestClient.getFuturesTickers({ settle: 'usdt', // Specify the settlement currency }); - console.log('Response: ', allTickers); // Log the response to the console + console.log('allTickers: ', allTickers); // Log the response to the console // Fetch a specific futures ticker with USDT settlement const ticker = await gateRestClient.getFuturesTickers({ settle: 'usdt', // Specify the settlement currency contract: 'BTC_USDT', // Specify the contract }); - console.log('Response: ', ticker); // Log the response to the console + console.log('ticker: ', ticker); // Log the response to the console } catch (e) { console.error(`Error in execution: `, e); // Log any errors that occur } diff --git a/examples/spot/getOrders.ts b/examples/spot/getOrders.ts index 229ea88..1adc617 100644 --- a/examples/spot/getOrders.ts +++ b/examples/spot/getOrders.ts @@ -18,18 +18,18 @@ async function getSpotOrders() { console.log('Using API keys:', account); // Fetch open spot orders for the BTC_USDT currency pair - const orders = await gateRestClient.getSpotOrders({ + const openOrders = await gateRestClient.getSpotOrders({ currency_pair: 'BTC_USDT', // Specify the currency pair status: 'open', // Specify the status of the orders to fetch }); - console.log('Response: ', orders); // Log the response to the console + console.log('openOrders: ', openOrders); // Log the response to the console // Fetch finished spot orders for the BTC_USDT currency pair - const orders1 = await gateRestClient.getSpotOrders({ + const finishedOrders = await gateRestClient.getSpotOrders({ currency_pair: 'BTC_USDT', // Specify the currency pair status: 'finished', // Specify the status of the orders to fetch }); - console.log('Response: ', orders1); // Log the response to the console + console.log('finishedOrders: ', finishedOrders); // Log the response to the console } catch (e) { console.error(`Error in execution: `, e); // Log any errors that occur }