Skip to content

Files

Latest commit

author
gateio
Feb 10, 2025
da1b896 · Feb 10, 2025

History

History
143 lines (93 loc) · 4 KB

WithdrawalApi.md

File metadata and controls

143 lines (93 loc) · 4 KB

WithdrawalApi

All URIs are relative to https://api.gateio.ws/api/v4

Method HTTP request Description
withdraw POST /withdrawals Withdraw
withdrawPushOrder POST /withdrawals/push UID transfer
cancelWithdrawal DELETE /withdrawals/{withdrawal_id} Cancel withdrawal with specified ID

withdraw

Promise<{ response: http.IncomingMessage; body: LedgerRecord; }> withdraw(ledgerRecord)

Withdraw

Withdrawals to Gate addresses do not incur transaction fees.

Example

const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");

const api = new GateApi.WithdrawalApi(client);
const ledgerRecord = new LedgerRecord(); // LedgerRecord | 
api.withdraw(ledgerRecord)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
ledgerRecord LedgerRecord

Return type

Promise<{ response: AxiosResponse; body: LedgerRecord; }> LedgerRecord

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

withdrawPushOrder

Promise<{ response: http.IncomingMessage; body: UidPushWithdrawalResp; }> withdrawPushOrder(uidPushWithdrawal)

UID transfer

Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts

Example

const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");

const api = new GateApi.WithdrawalApi(client);
const uidPushWithdrawal = new UidPushWithdrawal(); // UidPushWithdrawal | 
api.withdrawPushOrder(uidPushWithdrawal)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
uidPushWithdrawal UidPushWithdrawal

Return type

Promise<{ response: AxiosResponse; body: UidPushWithdrawalResp; }> UidPushWithdrawalResp

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

cancelWithdrawal

Promise<{ response: http.IncomingMessage; body: LedgerRecord; }> cancelWithdrawal(withdrawalId)

Cancel withdrawal with specified ID

Example

const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");

const api = new GateApi.WithdrawalApi(client);
const withdrawalId = "210496"; // string | 
api.cancelWithdrawal(withdrawalId)
   .then(value => console.log('API called successfully. Returned data: ', value.body),
         error => console.error(error));

Parameters

Name Type Description Notes
withdrawalId string [default to undefined]

Return type

Promise<{ response: AxiosResponse; body: LedgerRecord; }> LedgerRecord

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json