Trying to transfer 10 USDT from futures account to spot and it doesn't work, code is next:
`# !/usr/bin/env python
coding: utf-8
import logging
import time
from decimal import Decimal as D, ROUND_UP, getcontext
from gate_api import ApiClient, Configuration, Order, SpotApi, WalletApi, FuturesApi, FuturesOrder, Transfer
from gate_api.exceptions import GateApiException
from config import RunConfig
Trying to transfer 10 USDT from futures account to spot and it doesn't work, code is next:
`# !/usr/bin/env python
coding: utf-8
import logging import time from decimal import Decimal as D, ROUND_UP, getcontext
from gate_api import ApiClient, Configuration, Order, SpotApi, WalletApi, FuturesApi, FuturesOrder, Transfer from gate_api.exceptions import GateApiException from config import RunConfig
logger = logging.getLogger(name)
def spot_demo(): currency_pair = "BTC_USDT" currency = "USDT"
spot_demo()`
Those are the errors:
`105.99474908522 10 Traceback (most recent call last): File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api_client.py", line 190, in __call_api response_data = self.request( File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api_client.py", line 471, in request return self.rest_client.POST( File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\rest.py", line 298, in POST return self.request( File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\rest.py", line 232, in request raise ApiException(http_resp=r) gate_api.exceptions.ApiException: (400) Reason: HTTP response headers: HTTPHeaderDict({'Date': 'Sun, 10 Oct 2021 17:19:54 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'openresty', 'X-Frame-Options': 'SAMEORIGIN', 'X-Powered-By': 'CF ()', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache, must-revalidate', 'Set-Cookie': 'login_notice_check=%2F; path=/; secure; HttpOnly'}) HTTP response body: {"label":"INVALID_PARAM_VALUE","message":"Invalid settle"}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\root\PycharmProjects\gateapi-python\example\spot.py", line 34, in
spot_demo()
File "C:\Users\root\PycharmProjects\gateapi-python\example\spot.py", line 32, in spot_demo
wallet_api.transfer(transfer)
File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api\wallet_api.py", line 429, in transfer
return self.transfer_with_http_info(transfer, **kwargs) # noqa: E501
File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api\wallet_api.py", line 494, in transfer_with_http_info
return self.api_client.call_api(
File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api_client.py", line 395, in call_api
return self.__call_api(
File "C:\Users\root\PycharmProjects\gateapi-python\gate_api\api_client.py", line 209, in __call_api
raise GateApiException(err.get('label'), err.get('message'), err.get('detail'), e)
gate_api.exceptions.GateApiException: (400)
Reason:
HTTP response headers: HTTPHeaderDict({'Date': 'Sun, 10 Oct 2021 17:19:54 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'openresty', 'X-Frame-Options': 'SAMEORIGIN', 'X-Powered-By': 'CF ()', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache, must-revalidate', 'Set-Cookie': 'login_notice_check=%2F; path=/; secure; HttpOnly'})
HTTP response body: {"label":"INVALID_PARAM_VALUE","message":"Invalid settle"}
Process finished with exit code 1 `