BitZ contract related summaries

Author: The Little Dream, Created: 2019-10-21 17:47:00, Updated: 2020-05-09 10:20:17

BitZ contract related summaries

Use cases for strategies

Interface use related aggregation

  • Test the account asset data

    /* 测试账户资产数据 
    {
    Info:map[
        status:200 
        msg: 
        data:map[
            time:1.571122558e+09 
            estimate_BTC:0.01323647 
            estimate_USD:110.00 
            estimate_CNY:778.35 
            balances:[
                map[
                    coin:BTC 
                    balance:0.00000000 
                    positionMargin:0.00000000 
                    unrlzPnl:0.00000000 
                    estimate_BTC:0.00000000 
                    estimate_USD:0.00 
                    orderMargin:0.00000000 
                    total:0.00000000 
                    estimate_CNY:0.00
                ] 
                map[
                    unrlzPnl:0.00000000 
                    estimate_CNY:0.00 
                    estimate_USD:0.00 
                    coin:ETH 
                    balance:0.00000000 
                    positionMargin:0.00000000 
                    orderMargin:0.00000000 
                    total:0.00000000 
                    estimate_BTC:0.00000000
                ] 
                map[unrlzPnl:0.00000000 total:0.00000000 estimate_CNY:0.00 coin:LTC balance:0.00000000 orderMargin:0.00000000 positionMargin:0.00000000 estimate_BTC:0.00000000 estimate_USD:0.00]   
    
                map[coin:EOS orderMargin:0.00000000 estimate_CNY:0.00 balance:0.00000000 positionMargin:0.00000000 unrlzPnl:0.00000000 total:0.00000000 estimate_BTC:0.00000000 estimate_USD:0.00]   
    
                map[balance:110.00000000 positionMargin:0.00000000 estimate_USD:110.00 estimate_CNY:778.35 coin:USDT orderMargin:0.00000000 unrlzPnl:0.00000000 total:110.00000000 estimate_BTC:0.01323647]   
    
                map[unrlzPnl:0.00000000 estimate_CNY:0.00 orderMargin:0.00000000 total:0.00000000 estimate_BTC:0.00000000 estimate_USD:0.00 coin:BZ balance:0.00000000 positionMargin:0.00000000]
            ]
        ] 
        time:1.571122558e+09 
        microtime:0.81880700 1571122558 
        source:api
    ] 
    Stocks:0 FrozenStocks:0 Balance:0 FrozenBalance:0}
    */
    
  • The parameter in the interface that needs to be transmitted is the contract ID, and you need to first visit the exchange interface to get a map of the specific contract, contract details.

  • Contracts are divided into direct and reverse contracts, settlement and pricing are different.

  • A currency spot contract is a reverse contract, settled in currency (non-USDT settlement)

  • Testing, if you can't use other leverage values when holding one type of leverage, will return an error:
    map[status:-200 msg:Leverage error data: time:1.571130679e+09 microtime:0.37469600 1571130679 source:api]

  • When holding a position, the position is even, if the leverage is not the same, the position cannot be evened, reporting error: Map[status:-200 msg:Leverage error data: time:1.571366118e+09 microtime: 0.74409100 1571366118 source:api] This is a list of all the different ways Leverage is credited in the database.

  • When not in storage, the raw information returned by the API to the storage interface is: This is a list of all the characters that appear in the game.

  • In the case of a transaction, the total amount of the transaction will be divided by the total amount of the transaction, and the total amount of the transaction will be exchanged.

  • When holding a position, orders in the down position direction, not exceeding the position, the account will not have a collateral deduction. Beyond the leveling part, the funds in the account will be deducted as collateral.


More

BigFishI don't have a whole-stock interface or a single-stock interface.