Gathering detailed insights and metrics for gateio-nodejs-api
Gathering detailed insights and metrics for gateio-nodejs-api
Gathering detailed insights and metrics for gateio-nodejs-api
Gathering detailed insights and metrics for gateio-nodejs-api
This service was created simply for GateIO spot API transactions. The heavily used processes were simplified and coded on a single page
npm install gateio-nodejs-api
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1 Stars
15 Commits
1 Forks
1 Branches
Updated on Aug 17, 2022
Latest Version
1.0.9
Package Id
gateio-nodejs-api@1.0.9
Unpacked Size
47.44 kB
Size
7.14 kB
File Count
3
NPM Version
8.11.0
Node Version
16.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
https://www.npmjs.com/package/gateio-nodejs-api
npm install gateio-nodejs-api
- myWallet,
- orderCreate,
- getOrder,
- getOpenOrders,
- cancelOrder,
- withdrawalStatus,
- withdrawals,
- pairs,
- trades,
- tickers,
- order_book,
- history,
- listOrders,
- candlesticks,
- currencies,
- total_balance,
- fee,
- saved_address,
- deposits_list,
- withdrawals_list,
- deposit_address,
- currency_chains
1const gateioApi = require('gateio') 2client = gateioApi()
1const gateioApi = require('gateio') 2client = gateioApi(API_KEY, API_SECRET)
1 2client.myWallet().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { currency: 'BTC', available: '0.00000028', locked: '0' }, 3 { currency: 'USDT', available: '0.000000000009', locked: '0' }, 4 ]
1 2client.currency_chains().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { 3 chain: 'BTC', 4 name_cn: '比特币OMNI', 5 name_en: 'BTC/OMNI', 6 is_disabled: 0, 7 is_deposit_disabled: 0, 8 is_withdraw_disabled: 0 9 }, 10 { 11 chain: 'ETH', 12 name_cn: '以太坊ERC20', 13 name_en: 'ETH/ERC20', 14 is_disabled: 0, 15 is_deposit_disabled: 0, 16 is_withdraw_disabled: 0 17 }, 18 { 19 chain: 'TRX', 20 name_cn: '波场TRC20', 21 name_en: 'Tron/TRC20', 22 is_disabled: 0, 23 is_deposit_disabled: 0, 24 is_withdraw_disabled: 0 25 } 26 ]
1 2client.withdrawals_list().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { 3 "id": "210496", 4 "timestamp": "1542000000", 5 "currency": "USDT", 6 "address": "1HkxtBAMrA3tP5ENnYY2CZortjZvFDH5Cs", 7 "txid": "128988928203223323290", 8 "amount": "222.61", 9 "memo": "", 10 "status": "DONE", 11 "chain": "TRX" 12 } 13 ]
1 2client.deposits_list().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { 3 "id": "210496", 4 "timestamp": "1542000000", 5 "currency": "USDT", 6 "address": "1HkxtBAMrA3tP5ENnYY2CZortjZvFDH5Cs", 7 "txid": "128988928203223323290", 8 "amount": "222.61", 9 "memo": "", 10 "status": "DONE", 11 "chain": "TRX" 12 } 13 ]
1 2client.saved_address().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { 3 "currency": "usdt", 4 "chain": "TRX", 5 "address": "TWYirLzw2RARB2jfeFcfRPmeuU3rC7rakT", 6 "name": "gate", 7 "tag": "", 8 "verified": "1" 9 } 10 ]
1 2client.fee().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 { 2 "user_id": 10001, 3 "taker_fee": "0.002", 4 "maker_fee": "0.002", 5 "futures_taker_fee": "-0.00025", 6 "futures_maker_fee": "0.00075", 7 "gt_discount": false, 8 "gt_taker_fee": "0", 9 "gt_maker_fee": "0", 10 "loan_fee": "0.18", 11 "point_type": "1" 12 }
1 2client.total_balance('USDT').then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 { 2 total: { amount: '65.6720817126853324', currency: 'USDT' }, 3 details: { 4 cbbc: { amount: '0', currency: 'USDT' }, 5 cross_margin: { amount: '0', currency: 'USDT' }, 6 delivery: { amount: '0', currency: 'USDT' }, 7 finance: { amount: '0', currency: 'USDT' }, 8 futures: { amount: '0', currency: 'USDT' }, 9 margin: { amount: '0', currency: 'USDT' }, 10 quant: { amount: '0', currency: 'USDT' }, 11 spot: { amount: '65.6720817126853324', currency: 'USDT' } 12 } 13 }
1 2client.listOrders().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 { 3 id: '192133015275', 4 text: '101', 5 create_time: '1660916180', 6 update_time: '1660916180', 7 create_time_ms: 1660916180111, 8 update_time_ms: 1660916180111, 9 status: 'closed', 10 currency_pair: 'GALA_USDT', 11 type: 'limit', 12 account: 'spot', 13 side: 'buy', 14 amount: '465.55', 15 price: '0.053164', 16 time_in_force: 'gtc', 17 iceberg: '0', 18 left: '0.00', 19 fill_price: '24.75003465', 20 filled_total: '24.75003465', 21 fee: '0.83799', 22 fee_currency: 'GALA', 23 point_fee: '0', 24 gt_fee: '0', 25 gt_discount: false, 26 rebated_fee_currency: 'USDT' 27 } 28 ]
1 client.orderCreate('SHIB_USDT','1000000','0.000030','sell').then(async res=>{ 2 console.log(res) 3 });
Result:
1 { 2 id: '190597614648', 3 text: 'apiv4', 4 create_time: '1660507366', 5 update_time: '1660507366', 6 create_time_ms: 1660507366350, 7 update_time_ms: 1660507366350, 8 status: 'open', 9 currency_pair: 'SHIB_USDT', 10 type: 'limit', 11 account: 'spot', 12 side: 'sell', 13 amount: '1000000', 14 price: '0.00003', 15 time_in_force: 'gtc', 16 iceberg: '0', 17 left: '1000000', 18 fill_price: '0', 19 filled_total: '0', 20 fee: '0', 21 fee_currency: 'USDT', 22 point_fee: '0', 23 gt_fee: '0', 24 gt_discount: false, 25 rebated_fee: '0', 26 rebated_fee_currency: 'SHIB' 27 }
1 client.getOrder(190597614648, 'SHIB_USDT').then(async res => { 2 console.log(res) 3 });
Result:
1 { 2 id: '190597614648', 3 text: 'apiv4', 4 create_time: '1660507366', 5 update_time: '1660507366', 6 create_time_ms: 1660507366360, 7 update_time_ms: 1660507366360, 8 status: 'open', 9 currency_pair: 'SHIB_USDT', 10 type: 'limit', 11 account: 'spot', 12 side: 'sell', 13 amount: '1000000', 14 price: '0.00003', 15 time_in_force: 'gtc', 16 iceberg: '0', 17 left: '1000000', 18 fill_price: '0', 19 filled_total: '0', 20 fee: '0', 21 fee_currency: 'USDT', 22 point_fee: '0', 23 gt_fee: '0', 24 gt_discount: false, 25 rebated_fee: '0', 26 rebated_fee_currency: 'SHIB' 27 }
1 client.getOpenOrders().then(async res => { 2 console.log(res) 3 }); 4 5 client.getOpenOrders('SHIB_USDT').then(async res => { 6 console.log(res) 7 });
Result:
1 2 [ 3 { 4 id: '190597614648', 5 text: 'apiv4', 6 create_time: '1660507366', 7 update_time: '1660507366', 8 create_time_ms: 1660507366357, 9 update_time_ms: 1660507366357, 10 status: 'open', 11 currency_pair: 'SHIB_USDT', 12 type: 'limit', 13 account: 'spot', 14 side: 'sell', 15 amount: '1000000', 16 price: '0.00003', 17 time_in_force: 'gtc', 18 iceberg: '0', 19 left: '1000000', 20 fill_price: '0', 21 filled_total: '0', 22 fee: '0', 23 fee_currency: 'USDT', 24 point_fee: '0', 25 gt_fee: '0', 26 gt_discount: false, 27 rebated_fee: '0', 28 rebated_fee_currency: 'SHIB' 29 } 30 ]
Null Param
1 [ { currency_pair: 'SHIB_USDT', total: 1, orders: [ [Object] ] } ] 2 ``` 3 4
1 client.cancelOrderor(190597614648, 'SHIB_USDT').then(async res => { 2 console.log(res) 3 });
Result:
1 { 2 id: '190597614648', 3 text: 'apiv4', 4 create_time: '1660507366', 5 update_time: '1660509931', 6 create_time_ms: 1660507366350, 7 update_time_ms: 1660509931032, 8 status: 'cancelled', 9 currency_pair: 'SHIB_USDT', 10 type: 'limit', 11 account: 'spot', 12 side: 'sell', 13 amount: '1000000', 14 price: '0.00003', 15 time_in_force: 'gtc', 16 iceberg: '0', 17 left: '1000000', 18 fill_price: '0', 19 filled_total: '0', 20 fee: '0', 21 fee_currency: 'USDT', 22 point_fee: '0', 23 gt_fee: '0', 24 gt_discount: false, 25 rebated_fee: '0', 26 rebated_fee_currency: 'SHIB' 27 }
1 client.pairs('SHIB_USDT').then(async res => { 2 console.log(res) 3 })
1 client.trades('SHIB_USDT').then(async res => { 2 console.log(res) 3 })
1 client.tickers('SHIB_USDT').then(async res => { 2 console.log(res) 3 })
1 client.order_book('SHIB_USDT').then(async res => { 2 console.log(res) 3 })
1 2client.candlesticks().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 [ 2 [ 3 '1660829400', 4 '2068154.5862748175', 5 '23451.21', 6 '23518.9', 7 '23439.57', 8 '23518.9', 9 '88.077584055' 10 ] 11 ]
1 2client.currencies().then(async res=>{ 3 console.log(res) 4 }); 5
Result:
1 { 2 currency: 'BTC', 3 delisted: false, 4 withdraw_disabled: false, 5 withdraw_delayed: false, 6 deposit_disabled: false, 7 trade_disabled: false, 8 chain: 'BTC' 9 }
currency param is null
1 [ 2 { 3 currency: 'BTC', 4 delisted: false, 5 withdraw_disabled: false, 6 withdraw_delayed: false, 7 deposit_disabled: false, 8 trade_disabled: false, 9 chain: 'BTC' 10 } 11 ]
No vulnerabilities found.
No security vulnerabilities found.