bybit-exchange/pybit

Something is wrong with purchasing lev-tokens

loxxxlie opened this issue · 0 comments

Parameters that are required are ltCoin and ltAmount (even though in redeem method they are ltCoin and quantity which is strange).
Redeem works, but purchasing doesn't.
I checked minimum number of this exact tokens to buy per transaction and my number is above, so it cannot be a problem.
When I try to

ans = session.purchase_leveraged_token(
                ltCoin=dict['instrument'],
                ltAmount=str(quantity),
)

I get:
image

I also tried to ROUND my float quantity before making it string, but it didn't help.
And I checked ltStatus. For APE2L it is "1" which mean that it can be bought and sold.
Seems like the params which are expected are not ltCoin and ltAmount and that's why I get invalid parameter sent