{"code":-3028,"msg":"Not a valid margin pair."}

Hi, i’m trying to create margin order but get this error: {“code”:-3028,“msg”:“Not a valid margin pair.”}.
I cant find more deeper explanation of this error in docs or in google. Similar request for placing order but only on api/v3/order, not on sapi/v1/margin/order works properly.

Not all pairs are tradeable in margin, you would have to check in '/ sapi / v1 / margin / allPairs' if your pair is tradeable in margin

as @Saratoga said, not all spot symbols is allowed for margin trade.

@Saratoga sorry for delay, i tryed your solution but it seems that this pair is traded:
{‘id’: 376870555451677893, ‘symbol’: ‘BTCUSDT’, ‘base’: ‘BTC’, ‘quote’: ‘USDT’, ‘isMarginTrade’: True, ‘isBuyAllowed’: True, ‘isSellAllowed’: True}.
also i have this problem with other pairs.

You should review the data of your order, mainly the symbol, maybe you are having a bad time, check that it is in UPPERCASE, that the name matches or that it does not have blank spaces or special characters (BTCUSD, BTC-USDT, btcusdt) I think that there must be the error

@Saratoga, thanks for response, but i can’t see any error in this request:
https://api.binance.com/sapi/v1/margin/order?symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC&quantity=0.00617200&price=12875.00000000&recvWindow=5000&sideEffectType=MARGIN_BUY&newClientOrderId=buy_BTCUSDT_Long_12986_13996_12500&timestamp=1603634263000&signature=95ead2eb0b6098e26fc3f98ab9b4fe18ed8e183d42b6eacf4d10e41e5472b3b5

The ticksize for BTCUSDT is 0.01 and the price you are passing does not meet that filter the same problem you have with the amount, the stepsize is 0.000001 and your quantity does not meet that filter

@Saratoga Thanks for your response, it seems that i don’t understand this rule correctly:
in my opinion 12877.00000000 have quotePrecision 8 and (12875.00000000-0.01) % 0.01 == 0, same case with quantity. I also tried to pass price=12877.00 and quantity=0.006172, but have the same error. Can you please explain it?

@1119 Sorry but do you mind sharing what’s the error message from these parameters?

@dino It’s also erorr {“code”:-3028,”msg”:”Not a valid margin pair.”}

@1119 what was the specific request returning this error?
thank you

@dino https://api.binance.com/sapi/v1/margin/order?symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC&quantity=0.00617200&price=12875.00000000&recvWindow=5000&sideEffectType=MARGIN_BUY&newClientOrderId=buy_BTCUSDT_Long_12986_13996_12500&timestamp=1603634263000&signature=95ead2eb0b6098e26fc3f98ab9b4fe18ed8e183d42b6eacf4d10e41e5472b3b5

@1119 these parameters works fine for me, BTCUSDT is a valid margin pair, so I’m not sure why it returns this error.

  • Is the account with the API key has margin account open?

Otherwise please contact Customer Support and see if they can help to check the account status.

Content-Type should be application/json not application/x-www-form-urlencoded