ccxt: Huobi fetchBalance of linear error 4002

Operating System

Windows 10

Programming Languages

JS

CCXT Version

2.2.62

Description

I am trying to fetch Huobi futures account balance and catch error

ExchangeError: Huobi {"status":"error","err_code":4002,"err_msg":"The merged cross and isolated margin account for USDT-M futures is unavailable. Please complete the query with linear-swap-api/v3/unified_account_info","ts":1674149112391}

Would someone be able to help me?

Code

const balance = await huobiExchange.fetchTotalBalance({
		"defaultType" : "swap",
		"defaultSubType": "linear"
});

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

use await e.contractPrivatePostLinearSwapApiV3SwapSwitchAccountType ({'account_type':1}) before and then re-try. then let me know if it helps or not.

@Mnemon1k yes, thank you! We will try to resolve it asap and will revert back to you here!