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 |
\GateApi\Model\LedgerRecord withdraw($ledger_record)
Withdraw
If the recipient's on-chain address is also Gate, no transaction fee will be charged
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Gate APIv4 authorization: apiv4
$config = GateApi\Configuration::getDefaultConfiguration()->setKey('YOUR_API_KEY')->setSecret('YOUR_API_SECRET');
$apiInstance = new GateApi\Api\WithdrawalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$ledger_record = new \GateApi\Model\LedgerRecord(); // \GateApi\Model\LedgerRecord |
try {
$result = $apiInstance->withdraw($ledger_record);
print_r($result);
} catch (GateApi\GateApiException $e) {
echo "Gate API Exception: label: {$e->getLabel()}, message: {$e->getMessage()}" . PHP_EOL;
} catch (Exception $e) {
echo 'Exception when calling WithdrawalApi->withdraw: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| ledger_record | \GateApi\Model\LedgerRecord |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\GateApi\Model\UidPushWithdrawalResp withdrawPushOrder($uid_push_withdrawal)
UID transfer
Transfers between main spot accounts. Both parties cannot be sub-accounts
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Gate APIv4 authorization: apiv4
$config = GateApi\Configuration::getDefaultConfiguration()->setKey('YOUR_API_KEY')->setSecret('YOUR_API_SECRET');
$apiInstance = new GateApi\Api\WithdrawalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$uid_push_withdrawal = new \GateApi\Model\UidPushWithdrawal(); // \GateApi\Model\UidPushWithdrawal |
try {
$result = $apiInstance->withdrawPushOrder($uid_push_withdrawal);
print_r($result);
} catch (GateApi\GateApiException $e) {
echo "Gate API Exception: label: {$e->getLabel()}, message: {$e->getMessage()}" . PHP_EOL;
} catch (Exception $e) {
echo 'Exception when calling WithdrawalApi->withdrawPushOrder: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| uid_push_withdrawal | \GateApi\Model\UidPushWithdrawal |
\GateApi\Model\UidPushWithdrawalResp
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\GateApi\Model\WithdrawalsDel cancelWithdrawal($withdrawal_id)
Cancel withdrawal with specified ID
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Gate APIv4 authorization: apiv4
$config = GateApi\Configuration::getDefaultConfiguration()->setKey('YOUR_API_KEY')->setSecret('YOUR_API_SECRET');
$apiInstance = new GateApi\Api\WithdrawalApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$withdrawal_id = '210496'; // string |
try {
$result = $apiInstance->cancelWithdrawal($withdrawal_id);
print_r($result);
} catch (GateApi\GateApiException $e) {
echo "Gate API Exception: label: {$e->getLabel()}, message: {$e->getMessage()}" . PHP_EOL;
} catch (Exception $e) {
echo 'Exception when calling WithdrawalApi->cancelWithdrawal: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| withdrawal_id | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]