bybit-exchange / pybit

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

404 while calling place batch order #165

Closed jeffhappily closed 1 year ago

jeffhappily commented 1 year ago

I'm trying to call the place_batch_order in Python

session = HTTP(testnet=False, api_key=api_key, api_secret=secret_key)

response = session.place_batch_order(
    category="linear",
    request=[...],
)

but I'm getting an error saying

An error occurred while placing the order: Http status code is not 200. (ErrCode: 404) (ErrTime: 03:01:53).
Request → POST https://api.bybit.com/v5/order/create-batch
LaAlquimia commented 1 year ago

I got same on get_positions()

image

Kamsby commented 1 year ago

@LaAlquimia Make sure you are passing the category.

@jeffhappily place_batch_order is only for UTA PRO users. Did you upgrade your account ?

jeffhappily commented 1 year ago

@Kamsby Sorry I was not aware of that. I know there UTA (Unified Trading Account) but what's UTA Pro and how do I get it?

Kamsby commented 1 year ago

@jeffhappily Goto https://www.bybit.com/app/user/api-management and click "Upgrade Now" button for UTA PRO

Screenshot 2023-09-28 at 2 30 32 PM
BCusack commented 1 year ago

Needs to be added to documentation - wasted a bit of time today on this one. Better error response than 404 would help.

dextertd commented 1 year ago

Docs say UTA Pro:

Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)

LaAlquimia commented 1 year ago

UTA

Works for me