All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
withdraw | POST /withdrawals | Withdraw |
withdraw_push_order | POST /withdrawals/push | UID transfer |
cancel_withdrawal | DELETE /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID |
LedgerRecord withdraw(ledger_record)
Withdraw
Withdrawals to Gate addresses do not incur transaction fees.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WithdrawalApi(api_client)
ledger_record = gate_api.LedgerRecord() # LedgerRecord |
try:
# Withdraw
api_response = api_instance.withdraw(ledger_record)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling WithdrawalApi->withdraw: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ledger_record | LedgerRecord |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Withdraw request is accepted. Refer to withdrawal records for status | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UidPushWithdrawalResp withdraw_push_order(uid_push_withdrawal)
UID transfer
Transfers between main spot accounts are allowed; however, both parties cannot be sub-accounts
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WithdrawalApi(api_client)
uid_push_withdrawal = gate_api.UidPushWithdrawal() # UidPushWithdrawal |
try:
# UID transfer
api_response = api_instance.withdraw_push_order(uid_push_withdrawal)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling WithdrawalApi->withdraw_push_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uid_push_withdrawal | UidPushWithdrawal |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The request has been accepted. Check the withdrawal record status for the processing result. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LedgerRecord cancel_withdrawal(withdrawal_id)
Cancel withdrawal with specified ID
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.WithdrawalApi(api_client)
withdrawal_id = '210496' # str |
try:
# Cancel withdrawal with specified ID
api_response = api_instance.cancel_withdrawal(withdrawal_id)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling WithdrawalApi->cancel_withdrawal: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
withdrawal_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Cancellation accepted. Refer to record status for the cancellation result | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]