bybit-exchange / pybit

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

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

Closed Mihlusha closed 10 months ago

Mihlusha commented 11 months 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 11 months ago

client = HTTP(

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

print(client.get_wallet_balance(accountType="UNIFIED"))
Kamsby commented 10 months 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