3.1 Binance_interface APP U本位合约交易账户

2024-02-11 14:28

本文主要是介绍3.1 Binance_interface APP U本位合约交易账户,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Binance_interface APP U本位合约交易账户

  • Github地址
  • PyTed量化交易研究院
量化交易研究群(VX) = py_ted

目录

  • Binance_interface APP U本位合约交易账户
    • 1. APP U本位合约交易账户函数总览
    • 2. 模型实例化
    • 3. 获取账户信息 get_account
    • 4. 获取单个产品余额 get_balance
    • 5. 获取全部产品余额(列表格式) get_balances
    • 6. 获取全部产品余额(字典格式)
    • 7. 调整开仓杠杆 set_leverage
    • 8. 更改持仓模式 set_marginType
    • 9. 获取单个产品的持仓信息 get_position
    • 10. 获取全部产品的持仓信息(列表格式) get_positions
    • 11. 获取全部产品的持仓信息(字典格式) get_positionsMap

1. APP U本位合约交易账户函数总览

方法解释
get_account获取账户信息
get_balance获取单个产品余额
get_balances获取全部产品余额(列表格式)
get_balancesMap获取全部产品余额(字典格式)
set_leverage调整开仓杠杆
set_marginType更改持仓模式
get_position获取单个产品的持仓信息
get_positions获取全部产品的持仓信息(列表格式)
get_positionsMap获取全部产品的持仓信息字典(字典格式)

2. 模型实例化

from binance_interface.app import BinanceUM
from binance_interface.app.utils import eprint
# 转发:需搭建转发服务器,可参考:https://github.com/pyted/binance_resender
proxy_host = None
key = 'xxxx'
secret = 'xxxx'binanceUM = BinanceUM(key=key, secret=secret,proxy_host=proxy_host
)
account = binanceUM.account

3. 获取账户信息 get_account

account_result = account.get_account()
eprint(account_result)

输出:

>>> {'code': 200,
>>>  'data': {'feeTier': 0,
>>>           'canTrade': True,
>>>           'canDeposit': True,
>>>           'canWithdraw': True,
>>>           'tradeGroupId': -1,
>>>           'updateTime': 0,
>>>           'multiAssetsMargin': False,
>>>           'totalInitialMargin': '74.07260000',
>>>           'totalMaintMargin': '0.21261825',
>>>           'totalWalletBalance': '100.09787528',
>>>           'totalUnrealizedProfit': '-1.35838677',
>>>           'totalMarginBalance': '98.73948851',
>>>           'totalPositionInitialMargin': '38.17260000',
>>>           'totalOpenOrderInitialMargin': '35.90000000',
>>>           'totalCrossWalletBalance': '60.58480282',
>>>           'totalCrossUnPnl': '0.00000000',
>>>           'availableBalance': '24.68480282',
>>>           'maxWithdrawAmount': '24.68480282',
>>>           'assets': [{'asset': 'BTC',
>>>                       'walletBalance': '0.00000000',
>>>                       'unrealizedProfit': '0.00000000',
>>>                       'marginBalance': '0.00000000',
>>>                       'maintMargin': '0.00000000',
>>>                       '...': '......'},
>>>                      {'asset': 'XRP',
>>>                       'walletBalance': '0.00000000',
>>>                       'unrealizedProfit': '0.00000000',
>>>                       'marginBalance': '0.00000000',
>>>                       'maintMargin': '0.00000000',
>>>                       '...': '......'},
>>>                      {'asset': 'TUSD',
>>>                       'walletBalance': '0.00000000',
>>>                       'unrealizedProfit': '0.00000000',
>>>                       'marginBalance': '0.00000000',
>>>                       'maintMargin': '0.00000000',
>>>                       '...': '......'},
>>>                      {'asset': 'BNB',
>>>                       'walletBalance': '0.00000000',
>>>                       'unrealizedProfit': '0.00000000',
>>>                       'marginBalance': '0.00000000',
>>>                       'maintMargin': '0.00000000',
>>>                       '...': '......'},
>>>                      {'asset': 'ETH',
>>>                       'walletBalance': '0.00000000',
>>>                       'unrealizedProfit': '0.00000000',
>>>                       'marginBalance': '0.00000000',
>>>                       'maintMargin': '0.00000000',
>>>                       '...': '......'},
>>>                      '......'],
>>>           'positions': [{'symbol': 'SNTUSDT',
>>>                          'initialMargin': '0',
>>>                          'maintMargin': '0',
>>>                          'unrealizedProfit': '0.00000000',
>>>                          'positionInitialMargin': '0',
>>>                          '...': '......'},
>>>                         {'symbol': 'SNTUSDT',
>>>                          'initialMargin': '0',
>>>                          'maintMargin': '0',
>>>                          'unrealizedProfit': '0.00000000',
>>>                          'positionInitialMargin': '0',
>>>                          '...': '......'},
>>>                         {'symbol': 'SUSHIUSDT',
>>>                          'initialMargin': '0',
>>>                          'maintMargin': '0',
>>>                          'unrealizedProfit': '0.00000000',
>>>                          'positionInitialMargin': '0',
>>>                          '...': '......'},
>>>                         {'symbol': 'SUSHIUSDT',
>>>                          'initialMargin': '0',
>>>                          'maintMargin': '0',
>>>                          'unrealizedProfit': '0.00000000',
>>>                          'positionInitialMargin': '0',
>>>                          '...': '......'},
>>>                         {'symbol': 'BTSUSDT',
>>>                          'initialMargin': '0',
>>>                          'maintMargin': '0',
>>>                          'unrealizedProfit': '0.00000000',
>>>                          'positionInitialMargin': '0',
>>>                          '...': '......'},
>>>                         '......']},
>>>  'msg': ''}

4. 获取单个产品余额 get_balance

# 等价于下面代码:account.get_balance(symbol='BTCUSDT',base_asset='USDT')
balance_result = account.get_balance(asset='BTC')
eprint(balance_result)

输出:

>>> {'code': 200,
>>>  'data': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>           'asset': 'BTC',
>>>           'balance': '0.00000000',
>>>           'crossWalletBalance': '0.00000000',
>>>           'crossUnPnl': '0.00000000',
>>>           'availableBalance': '0.00000000',
>>>           'maxWithdrawAmount': '0.00000000',
>>>           'marginAvailable': True,
>>>           'updateTime': 0},
>>>  'msg': ''}

5. 获取全部产品余额(列表格式) get_balances

# 参数assets默认为[],表示全部货币
balances_result = account.get_balances()
eprint(balances_result)

输出:

>>> {'code': 200,
>>>  'data': [{'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'BTC',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'XRP',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'TUSD',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'BNB',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'ETH',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'USDT',
>>>            'balance': '100.09787528',
>>>            'crossWalletBalance': '60.58480282',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'USDP',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'USDC',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'}],
>>>  'msg': ''}
# 指定多个货币
balances_result = account.get_balances(assets=['BTC', 'ETH'])
eprint(balances_result)

输出:

>>> {'code': 200,
>>>  'data': [{'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'BTC',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'},
>>>           {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>            'asset': 'ETH',
>>>            'balance': '0.00000000',
>>>            'crossWalletBalance': '0.00000000',
>>>            'crossUnPnl': '0.00000000',
>>>            '...': '......'}],
>>>  'msg': ''}

6. 获取全部产品余额(字典格式)

# 参数assets默认为[],表示全部货币
balancesMap_result = account.get_balancesMap()
eprint(balancesMap_result)

输出:

>>> {'code': 200,
>>>  'data': {'BTC': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'BTC',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'},
>>>           'XRP': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'XRP',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'},
>>>           'TUSD': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                    'asset': 'TUSD',
>>>                    'balance': '0.00000000',
>>>                    'crossWalletBalance': '0.00000000',
>>>                    'crossUnPnl': '0.00000000',
>>>                    '...': '......'},
>>>           'BNB': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'BNB',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'},
>>>           'ETH': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'ETH',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'},
>>>           'USDT': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                    'asset': 'USDT',
>>>                    'balance': '100.09787528',
>>>                    'crossWalletBalance': '60.58480282',
>>>                    'crossUnPnl': '0.00000000',
>>>                    '...': '......'},
>>>           'USDP': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                    'asset': 'USDP',
>>>                    'balance': '0.00000000',
>>>                    'crossWalletBalance': '0.00000000',
>>>                    'crossUnPnl': '0.00000000',
>>>                    '...': '......'},
>>>           'USDC': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                    'asset': 'USDC',
>>>                    'balance': '0.00000000',
>>>                    'crossWalletBalance': '0.00000000',
>>>                    'crossUnPnl': '0.00000000',
>>>                    '...': '......'}},
>>>  'msg': ''}
# 指定多个货币
balancesMap_result = account.get_balancesMap(assets=['BTC', 'ETH'])
eprint(balancesMap_result)

输出:

>>> {'code': 200,
>>>  'data': {'BTC': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'BTC',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'},
>>>           'ETH': {'accountAlias': 'SguXuXmYSgTiSgfW',
>>>                   'asset': 'ETH',
>>>                   'balance': '0.00000000',
>>>                   'crossWalletBalance': '0.00000000',
>>>                   'crossUnPnl': '0.00000000',
>>>                   '...': '......'}},
>>>  'msg': ''}

7. 调整开仓杠杆 set_leverage

leverage_result = account.set_leverage(symbol='BTCUSDT', leverage=2)
eprint(leverage_result)

输出:

>>> {'code': 200, 'data': {'symbol': 'BTCUSDT', 'leverage': 2, 'maxNotionalValue': '800000000'}, 'msg': ''}

8. 更改持仓模式 set_marginType

marginType_result = account.set_marginType(symbol='BTCUSDT', marginType='CROSSED')
eprint(marginType_result)

输出:

>>> {'code': 200, 'msg': 'success'}
marginType_result = account.set_marginType(symbol='BTCUSDT', marginType='ISOLATED')
eprint(marginType_result)

输出:

>>> {'code': 200, 'msg': 'success'}

9. 获取单个产品的持仓信息 get_position

position_result = account.get_position(symbol='MANAUSDT')
eprint(position_result)

输出:

>>> {'code': 200,
>>>  'data': {'CROSSED': {'LONG': {}, 'SHORT': {}},
>>>           'ISOLATED': {'LONG': {'symbol': 'MANAUSDT',
>>>                                 'initialMargin': '40.50029305',
>>>                                 'maintMargin': '0.09425190',
>>>                                 'unrealizedProfit': '-1.37959371',
>>>                                 'positionInitialMargin': '14.50029306',
>>>                                 'openOrderInitialMargin': '25.99999999',
>>>                                 'leverage': '1',
>>>                                 'isolated': True,
>>>                                 'entryPrice': '0.4812086956521',
>>>                                 'breakEvenPrice': '0.4771861363636',
>>>                                 'maxNotional': '1.0E7',
>>>                                 'positionSide': 'LONG',
>>>                                 'positionAmt': '33',
>>>                                 'notional': '14.50029306',
>>>                                 'isolatedWallet': '15.86670268',
>>>                                 'updateTime': 1706112001852,
>>>                                 'bidNotional': '26',
>>>                                 'askNotional': '5.34800000'},
>>>                        'SHORT': {}}},
>>>  'msg': ''}

10. 获取全部产品的持仓信息(列表格式) get_positions

# 参数symbols默认为[],表示全部产品
positions_result = account.get_positions()
eprint(positions_result)

输出:

>>> {'code': 200,
>>>  'data': {'CROSSED': {'LONG': [], 'SHORT': []},
>>>           'ISOLATED': {'LONG': [{'symbol': 'BNBUSDT',
>>>                                  'initialMargin': '11.74520151',
>>>                                  'maintMargin': '0.05872600',
>>>                                  'unrealizedProfit': '0.02160151',
>>>                                  'positionInitialMargin': '11.74520151',
>>>                                  'openOrderInitialMargin': '0',
>>>                                  'leverage': '1',
>>>                                  'isolated': True,
>>>                                  'entryPrice': '293.09',
>>>                                  'breakEvenPrice': '293.148618',
>>>                                  'maxNotional': '5.0E7',
>>>                                  'positionSide': 'LONG',
>>>                                  'positionAmt': '0.04',
>>>                                  'notional': '11.74520151',
>>>                                  'isolatedWallet': '11.72125528',
>>>                                  'updateTime': 1706117890515,
>>>                                  'bidNotional': '0',
>>>                                  'askNotional': '0'},
>>>                                 {'symbol': 'MANAUSDT',
>>>                                  'initialMargin': '40.50020000',
>>>                                  'maintMargin': '0.09425130',
>>>                                  'unrealizedProfit': '-1.37968677',
>>>                                  'positionInitialMargin': '14.50020000',
>>>                                  'openOrderInitialMargin': '26',
>>>                                  'leverage': '1',
>>>                                  'isolated': True,
>>>                                  'entryPrice': '0.4812086956521',
>>>                                  'breakEvenPrice': '0.4771861363636',
>>>                                  'maxNotional': '1.0E7',
>>>                                  'positionSide': 'LONG',
>>>                                  'positionAmt': '33',
>>>                                  'notional': '14.50020000',
>>>                                  'isolatedWallet': '15.86670268',
>>>                                  'updateTime': 1706112001852,
>>>                                  'bidNotional': '26',
>>>                                  'askNotional': '5.34800000'},
>>>                                 {'symbol': 'ADAUSDT',
>>>                                  'initialMargin': '11.92500000',
>>>                                  'maintMargin': '0.05962500',
>>>                                  'unrealizedProfit': '-0.00250000',
>>>                                  'positionInitialMargin': '11.92500000',
>>>                                  'openOrderInitialMargin': '0',
>>>                                  'leverage': '1',
>>>                                  'isolated': True,
>>>                                  'entryPrice': '0.4771',
>>>                                  'breakEvenPrice': '0.47719542',
>>>                                  'maxNotional': '5.0E7',
>>>                                  'positionSide': 'LONG',
>>>                                  'positionAmt': '25',
>>>                                  'notional': '11.92500000',
>>>                                  'isolatedWallet': '11.92511450',
>>>                                  'updateTime': 1706118204364,
>>>                                  'bidNotional': '0',
>>>                                  'askNotional': '0'}],
>>>                        'SHORT': []}},
>>>  'msg': ''}
# 指定多个产品
positions_result = account.get_positions(symbols=['MANAUSDT', 'BNBUSDT'])
eprint(positions_result)

输出:

>>> {'code': 200,
>>>  'data': {'CROSSED': {'LONG': [], 'SHORT': []},
>>>           'ISOLATED': {'LONG': [{'symbol': 'BNBUSDT',
>>>                                  'initialMargin': '11.74275896',
>>>                                  'maintMargin': '0.05871379',
>>>                                  'unrealizedProfit': '0.01915896',
>>>                                  'positionInitialMargin': '11.74275896',
>>>                                  'openOrderInitialMargin': '0',
>>>                                  'leverage': '1',
>>>                                  'isolated': True,
>>>                                  'entryPrice': '293.09',
>>>                                  'breakEvenPrice': '293.148618',
>>>                                  'maxNotional': '5.0E7',
>>>                                  'positionSide': 'LONG',
>>>                                  'positionAmt': '0.04',
>>>                                  'notional': '11.74275896',
>>>                                  'isolatedWallet': '11.72125528',
>>>                                  'updateTime': 1706117890515,
>>>                                  'bidNotional': '0',
>>>                                  'askNotional': '0'},
>>>                                 {'symbol': 'MANAUSDT',
>>>                                  'initialMargin': '40.50191963',
>>>                                  'maintMargin': '0.09426247',
>>>                                  'unrealizedProfit': '-1.37796714',
>>>                                  'positionInitialMargin': '14.50191963',
>>>                                  'openOrderInitialMargin': '26',
>>>                                  'leverage': '1',
>>>                                  'isolated': True,
>>>                                  'entryPrice': '0.4812086956521',
>>>                                  'breakEvenPrice': '0.4771861363636',
>>>                                  'maxNotional': '1.0E7',
>>>                                  'positionSide': 'LONG',
>>>                                  'positionAmt': '33',
>>>                                  'notional': '14.50191963',
>>>                                  'isolatedWallet': '15.86670268',
>>>                                  'updateTime': 1706112001852,
>>>                                  'bidNotional': '26',
>>>                                  'askNotional': '5.34800000'}],
>>>                        'SHORT': []}},
>>>  'msg': ''}

11. 获取全部产品的持仓信息(字典格式) get_positionsMap

# 参数symbols默认为[],表示全部产品
positionsMap_result = account.get_positionsMap()
eprint(positionsMap_result)

输出:

>>> {'code': 200,
>>>  'data': {'CROSSED': {'LONG': {}, 'SHORT': {}},
>>>           'ISOLATED': {'LONG': {'BNBUSDT': {'symbol': 'BNBUSDT',
>>>                                             'initialMargin': '11.74000000',
>>>                                             'maintMargin': '0.05870000',
>>>                                             'unrealizedProfit': '0.01640000',
>>>                                             'positionInitialMargin': '11.74000000',
>>>                                             'openOrderInitialMargin': '0',
>>>                                             'leverage': '1',
>>>                                             'isolated': True,
>>>                                             'entryPrice': '293.09',
>>>                                             'breakEvenPrice': '293.148618',
>>>                                             'maxNotional': '5.0E7',
>>>                                             'positionSide': 'LONG',
>>>                                             'positionAmt': '0.04',
>>>                                             'notional': '11.74000000',
>>>                                             'isolatedWallet': '11.72125528',
>>>                                             'updateTime': 1706117890515,
>>>                                             'bidNotional': '0',
>>>                                             'askNotional': '0'},
>>>                                 'MANAUSDT': {'symbol': 'MANAUSDT',
>>>                                              'initialMargin': '40.50350000',
>>>                                              'maintMargin': '0.09427275',
>>>                                              'unrealizedProfit': '-1.37638677',
>>>                                              'positionInitialMargin': '14.50350000',
>>>                                              'openOrderInitialMargin': '26',
>>>                                              'leverage': '1',
>>>                                              'isolated': True,
>>>                                              'entryPrice': '0.4812086956521',
>>>                                              'breakEvenPrice': '0.4771861363636',
>>>                                              'maxNotional': '1.0E7',
>>>                                              'positionSide': 'LONG',
>>>                                              'positionAmt': '33',
>>>                                              'notional': '14.50350000',
>>>                                              'isolatedWallet': '15.86670268',
>>>                                              'updateTime': 1706112001852,
>>>                                              'bidNotional': '26',
>>>                                              'askNotional': '5.34800000'},
>>>                                 'ADAUSDT': {'symbol': 'ADAUSDT',
>>>                                             'initialMargin': '11.92750000',
>>>                                             'maintMargin': '0.05963750',
>>>                                             'unrealizedProfit': '0.00000000',
>>>                                             'positionInitialMargin': '11.92750000',
>>>                                             'openOrderInitialMargin': '0',
>>>                                             'leverage': '1',
>>>                                             'isolated': True,
>>>                                             'entryPrice': '0.4771',
>>>                                             'breakEvenPrice': '0.47719542',
>>>                                             'maxNotional': '5.0E7',
>>>                                             'positionSide': 'LONG',
>>>                                             'positionAmt': '25',
>>>                                             'notional': '11.92750000',
>>>                                             'isolatedWallet': '11.92511450',
>>>                                             'updateTime': 1706118204364,
>>>                                             'bidNotional': '0',
>>>                                             'askNotional': '0'}},
>>>                        'SHORT': {}}},
>>>  'msg': ''}
# 指定多个产品
positionsMap_result = account.get_positionsMap(symbols=['MANAUSDT', 'BNBUSDT'])
eprint(positionsMap_result)

输出:

>>> {'code': 200,
>>>  'data': {'CROSSED': {'LONG': {}, 'SHORT': {}},
>>>           'ISOLATED': {'LONG': {'BNBUSDT': {'symbol': 'BNBUSDT',
>>>                                             'initialMargin': '11.74153010',
>>>                                             'maintMargin': '0.05870765',
>>>                                             'unrealizedProfit': '0.01793010',
>>>                                             'positionInitialMargin': '11.74153010',
>>>                                             'openOrderInitialMargin': '0',
>>>                                             'leverage': '1',
>>>                                             'isolated': True,
>>>                                             'entryPrice': '293.09',
>>>                                             'breakEvenPrice': '293.148618',
>>>                                             'maxNotional': '5.0E7',
>>>                                             'positionSide': 'LONG',
>>>                                             'positionAmt': '0.04',
>>>                                             'notional': '11.74153010',
>>>                                             'isolatedWallet': '11.72125528',
>>>                                             'updateTime': 1706117890515,
>>>                                             'bidNotional': '0',
>>>                                             'askNotional': '0'},
>>>                                 'MANAUSDT': {'symbol': 'MANAUSDT',
>>>                                              'initialMargin': '40.50639245',
>>>                                              'maintMargin': '0.09429155',
>>>                                              'unrealizedProfit': '-1.37349432',
>>>                                              'positionInitialMargin': '14.50639245',
>>>                                              'openOrderInitialMargin': '26',
>>>                                              'leverage': '1',
>>>                                              'isolated': True,
>>>                                              'entryPrice': '0.4812086956521',
>>>                                              'breakEvenPrice': '0.4771861363636',
>>>                                              'maxNotional': '1.0E7',
>>>                                              'positionSide': 'LONG',
>>>                                              'positionAmt': '33',
>>>                                              'notional': '14.50639245',
>>>                                              'isolatedWallet': '15.86670268',
>>>                                              'updateTime': 1706112001852,
>>>                                              'bidNotional': '26',
>>>                                              'askNotional': '5.34800000'}},
>>>                        'SHORT': {}}},
>>>  'msg': ''}

这篇关于3.1 Binance_interface APP U本位合约交易账户的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/700017

相关文章

React实现原生APP切换效果

《React实现原生APP切换效果》最近需要使用Hybrid的方式开发一个APP,交互和原生APP相似并且需要IM通信,本文给大家介绍了使用React实现原生APP切换效果,文中通过代码示例讲解的非常... 目录背景需求概览技术栈实现步骤根据 react-router-dom 文档配置好路由添加过渡动画使用

easyui同时验证账户格式和ajax是否存在

accountName: {validator: function (value, param) {if (!/^[a-zA-Z][a-zA-Z0-9_]{3,15}$/i.test(value)) {$.fn.validatebox.defaults.rules.accountName.message = '账户名称不合法(字母开头,允许4-16字节,允许字母数字下划线)';return fal

JavaEE7 Servlet 3.1(JSR 340)规范中文版

http://www.iteye.com/news/27727-jinnianshilongnian     Jave EE 7中的部分规范已正式获得批准通过,其中包括JSR340 Java Servlet 3.1规范,去年翻译了该规范,在此分享出来,希望对某些朋友有所帮助,不足之处请指正。   点击直接下载    在线版目录   Servlet3.1规范翻译

MFC中App,Doc,MainFrame,View各指针的互相获取

纸上得来终觉浅,为了熟悉获取方法,我建了个SDI。 首先说明这四个类的执行顺序是App->Doc->Main->View 另外添加CDialog类获得各个指针的方法。 多文档的获取有点小区别,有时间也总结一下。 //  App void CSDIApp::OnApp() {      //  App      //  Doc     CDocument *pD

ConstraintLayout布局里的一个属性app:layout_constraintDimensionRatio

ConstraintLayout 这是一个约束布局,可以尽可能的减少布局的嵌套。有一个属性特别好用,可以用来动态限制宽或者高app:layout_constraintDimensionRatio 关于app:layout_constraintDimensionRatio参数 app:layout_constraintDimensionRatio=“h,1:1” 表示高度height是动态变化

App Store最低版本要求汇总

1,自此日期起: 2024 年 4 月 29 日 自 2024 年 4 月 29 日起,上传到 App Store Connect 的 App 必须是使用 Xcode 15 为 iOS 17、iPadOS 17、Apple tvOS 17 或 watchOS 10 构建的 App。将 iOS App 提交至 App Store - Apple Developer 2,最低XCode版本 Xcod

鸿蒙自动化发布测试版本app

创建API客户端 API客户端是AppGallery Connect用于管理用户访问AppGallery Connect API的身份凭据,您可以给不同角色创建不同的API客户端,使不同角色可以访问对应权限的AppGallery Connect API。在访问某个API前,必须创建有权访问该API的API客户端。 1.登录AppGallery Connect网站,选择“用户与访问”。选择左侧

Llama 3.1大模型的预训练和后训练范式解析

Meta的Llama大型语言模型每次出新版本,都会是一大事件。前段时间他们不仅发布了3.1的一个超大型的405亿参数模型,还对之前的8亿和70亿参数的模型做了升级,让它们在MMLU测试中的表现更好了。 不同模型在MMLU基准测试中的表现 他们还出了一个92页的技术报告《Llama 3 Herd of Models》(https://arxiv.org/abs/2407.21783),里

Xinstall助力App全渠道统计,参数传递下载提升用户体验!

在移动互联网时代,App已成为我们日常生活中不可或缺的一部分。然而,对于App开发者来说,如何有效地推广和运营自己的应用,却是一个不小的挑战。尤其是在面对众多渠道、复杂的数据统计和用户需求多样化的情况下,如何精准地触达目标用户,提升用户的下载、安装和活跃度,更是考验着每一个运营者的智慧。 今天,我们就来揭秘一个能够帮助App开发者解决这些痛点的神器——Xinstall。作为一家一站式App全渠道

量化交易面试:什么是连贯风险度量?

连贯风险度量(Coherent Risk Measures)是金融风险管理中的一个重要概念,旨在提供一种合理且一致的方式来评估和量化风险。连贯风险度量的提出是为了克服传统风险度量方法(如VaR,风险价值)的一些局限性。以下是对连贯风险度量的详细解释: 基本概念: 连贯风险度量是指满足特定公理的风险度量方法,这些公理确保了风险评估的一致性和合理性。 这些公理包括:非负性、次可加性、同质性和单调