bybit-exchange / pybit

Official Python3 API connector for Bybit's HTTP and WebSockets APIs.
Other
418 stars 135 forks source link

pybit.exceptions.FailedRequestError: Http status code is not 200. (ErrCode: 404) #173

Closed Mihlusha closed 1 year ago

Mihlusha commented 1 year ago

Hello everyone, tell me why the wallet-balance request does not work?

pybit.exceptions.FailedRequestError: Http status code is not 200. (ErrCode: 404) (ErrTime: 20:26:15). Request → GET https://api.bybit.com/v5/account/wallet-balance: accountType=UNIFIED.

Mihlusha commented 1 year ago

client = HTTP(

    testnet = False,
    api_key=api_key,
    api_secret=secret_key
)

print(client.get_wallet_balance(accountType="UNIFIED"))
Kamsby commented 1 year ago

If your account is UTA, then use it as UNIFIED, otherwise use it as CONTRACT.

Refer the document - https://bybit-exchange.github.io/docs/v5/account/wallet-balance