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 |
Promise<{ response: http.IncomingMessage; body: LedgerRecord; }> withdraw(ledgerRecord)
Withdraw
Withdrawals to Gate addresses do not incur transaction fees.
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));
Name | Type | Description | Notes |
---|---|---|---|
ledgerRecord | LedgerRecord |
Promise<{ response: AxiosResponse; body: LedgerRecord; }> LedgerRecord
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: UidPushWithdrawalResp; }> withdrawPushOrder(uidPushWithdrawal)
UID transfer
Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts
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));
Name | Type | Description | Notes |
---|---|---|---|
uidPushWithdrawal | UidPushWithdrawal |
Promise<{ response: AxiosResponse; body: UidPushWithdrawalResp; }> UidPushWithdrawalResp
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: LedgerRecord; }> cancelWithdrawal(withdrawalId)
Cancel withdrawal with specified ID
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));
Name | Type | Description | Notes |
---|---|---|---|
withdrawalId | string | [default to undefined] |
Promise<{ response: AxiosResponse; body: LedgerRecord; }> LedgerRecord
- Content-Type: Not defined
- Accept: application/json