avatar of 发明者量化-小小梦 发明者量化-小小梦
집중하다 사신
4
집중하다
1271
수행원

BitZ 계약 관련 요약

만든 날짜: 2019-10-21 17:47:00, 업데이트 날짜: 2020-05-09 10:20:17
comments   2
hits   2275

BitZ 계약 관련 요약

전략 사용 사례

인터페이스 사용 관련 요약

  • 테스트 계정 자산 데이터
  /* 测试账户资产数据 
  {
  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}
  */
  • 인터페이스의 파라미터는 숫자 값을 전송해야 합니다. 계약 ID는 계약의 매핑을 얻기 위해 거래소 인터페이스를 방문해야 합니다. 계약의 세부 사항은 다음과 같습니다.

  • 계약은 직행 계약과 역행 계약으로 나뉘며, 결제와 계산은 다르다.

  • 동전 기반 계약은 역계약으로 동전으로 결제 (USDT 결제가 아닌)

  • 테스트, 다른 레버리지 값을 사용하여 포지션을 보유할 수 없는 경우, 오류가 발생할 수 있습니다:
    map[status:-200 msg:Leverage error data: time:1.571130679e+09 microtime:0.37469600 1571130679 source:api]

  • 포지션을 보유할 때, 평준화, 레버리지 값이 다르면 평준화할 수 없으며, 오류가 발생한다: map[status:-200 msg:Leverage error data: time:1.571366118e+09 microtime:0.74409100 1571366118 source:api]

  • 포지션이 없는 경우, API가 포지션 인터페이스를 접근하면 반환되는 원본 정보는 {map[status:200 msg: data:[] time:1.571366357e+09 microtime:0.23304400 1571366357 source:api]}

  • 주문할 때 전체 포장당 포장 분량이 있고, 전체 포장당 포장을 교환한다.

  • 포지션을 보유할 때, 하위 평소 포지션 방향의 주문, 포지션을 초과하지 않을 때, 계정에는 보증금이 적출되지 않습니다. 평소 포지션 가능한 부분을 초과하면 계정의 자금이 보증금으로 적출됩니다.