Futures_Kraken 海妖期货交易所使用汇总

Author: 发明者量化-小小梦, Created: 2019-12-18 10:36:35, Updated: 2019-12-18 10:40:52

Futures_Kraken 海妖期货交易所使用汇总

合约信息页面: https://www.kraken.com/zh-cn/features/futures

API 文档页面: https://support.kraken.com/hc/en-us/categories/360001806372-Futures-API

汇总

  • 1张合约1USD,有些合约是币本位合约,使用币作为保证金。有些合约是使用BTC作为保证金。
  • 杠杆最大50倍
  • 合约交割时间相关: Last Trading
    
    16:00 London time
    Month: Last Friday* of the month
    Quarter: Last Friday* of a month in the March quarterly cycle (March, June, September, December)
    

First Trading

  For inverse contracts:
  16:00 London time
  Month: The last Friday* of the calendar month where no contract exists in the following calendar month.  // 需要符合条件,接下的月份没有合约产生?
  Quarter: The last Friday* of the calendar month where a contract exists in the following calendar month. // 当每个月最后一个周五,季度合约变为月合约,也就是接下来一个月只有一个合约时,产生新季度合约?
  The fixed maturity listing schedule results in there always being listed simultaneously two contracts:
  - a Month contract which matures in between 1 and 42 days
  - a Quarter contract which matures in between 42 and 130 days
  For linear contracts on altcoins with less liquidity the listing schedule varies.
  • 持仓信息 持仓接口没有提供,平仓冻结,持仓保证金占用,仓位杠杆值,仓位盈亏。

  • 不支持K线接口,调用GetRecords会报not support。

  • 不支持GetOrder查询订单接口,调用会报not support。

  • tick行情接口,只有买一卖一,当前价格,不支持24小时 最高最低价格。GetTicker的 High Low 用当前买一、卖一填充。

  • 交易对设置,设置XBT_USD即为BTC币种的合约,策略代码中设置exchange.SetContractType("swap")为BTC的永续合约,对应交易所的合约代码:pi_xbtusd,设置exchange.SetContractType("month")为BTC的当月合约。对应例如当月的:fi_xbtusd_191227。 如果要交易:pv_xrpxbt合约,需要设置交易对为:XRP_XBT,调用exchange.SetContractType("swap")函数。

  • GetAccount函数返回的数据中FrozenStocks为0,因为交易所接口中持仓占用资金和挂单占用资金是写在一起的,无法区分,Stocks为当前可用资金数量。

  • SetMarginLevel无法设置杠杆,杠杆大小只能在交易所页面上设置(交易所API没有提供设置杠杆的接口,下单接口中也没有设置杠杆的参数)

  • 合约代码种类

    • 币本位合约 永续 : pi_xbtusd 交割 : fi_xbtusd_191227 月合约fi_bchusd_200327 季度合约,交割时间:UTC时间。

    • 正向合约 永续 : pv_xrpxbt,使用BTC作为保证金的合约。

合约信息,通过交易所API接口可以获取:

  {
      "result": "success",
      "instruments": [{
          "symbol": "pi_xbtusd",
          "type": "futures_inverse",
          "underlying": "rr_xbtusd",
          "tickSize": 0.5,
          "contractSize": 1,
          "tradeable": true,
          "marginLevels": [{
              "contracts": 0,
              "initialMargin": 0.02,
              "maintenanceMargin": 0.01
          }, {
              "contracts": 500000,
              "initialMargin": 0.04,
              "maintenanceMargin": 0.02
          }, {
              "contracts": 1000000,
              "initialMargin": 0.06,
              "maintenanceMargin": 0.03
          }, {
              "contracts": 3000000,
              "initialMargin": 0.1,
              "maintenanceMargin": 0.05
          }, {
              "contracts": 6000000,
              "initialMargin": 0.15,
              "maintenanceMargin": 0.075
          }],
          "fundingRateCoefficient": 8,
          "maxRelativeFundingRate": 0.0005,
          "retailMarginLevels": [{
              "contracts": 0,
              "initialMargin": 0.5,
              "maintenanceMargin": 0.25
          }]
      }, {
          "symbol": "pv_xrpxbt",
          "type": "futures_vanilla",
          "underlying": "rr_xrpxbt",
          "tickSize": 0.00000001,
          "contractSize": 1,
          "tradeable": true,
          "marginLevels": [{
              "contracts": 0,
              "initialMargin": 0.02,
              "maintenanceMargin": 0.01
          }, {
              "contracts": 100000,
              "initialMargin": 0.04,
              "maintenanceMargin": 0.02
          }, {
              "contracts": 500000,
              "initialMargin": 0.06,
              "maintenanceMargin": 0.03
          }, {
              "contracts": 2000000,
              "initialMargin": 0.1,
              "maintenanceMargin": 0.05
          }],
          "fundingRateCoefficient": 8,
          "maxRelativeFundingRate": 0.0005,
          "retailMarginLevels": [{
              "contracts": 0,
              "initialMargin": 0.5,
              "maintenanceMargin": 0.25
          }]
      }, {
          "symbol": "fi_xbtusd_191227",
          "type": "futures_inverse",
          "underlying": "rr_xbtusd",
          "lastTradingTime": "2019-12-27T16:00:00.000Z",
          "tickSize": 0.5,
          "contractSize": 1,
          "tradeable": true,
          "marginLevels": [{
              "contracts": 0,
              "initialMargin": 0.02,
              "maintenanceMargin": 0.01
          }, {
              "contracts": 500000,
              "initialMargin": 0.04,
              "maintenanceMargin": 0.02
          }, {
              "contracts": 1000000,
              "initialMargin": 0.06,
              "maintenanceMargin": 0.03
          }, {
              "contracts": 3000000,
              "initialMargin": 0.1,
              "maintenanceMargin": 0.05
          }, {
              "contracts": 6000000,
              "initialMargin": 0.15,
              "maintenanceMargin": 0.075
          }],
          "retailMarginLevels": [{
              "contracts": 0,
              "initialMargin": 0.5,
              "maintenanceMargin": 0.25
          }]
      }, {
          "symbol": "fi_ltcusd_200327",
          "type": "futures_inverse",
          "underlying": "rr_ltcusd",
          "lastTradingTime": "2020-03-27T16:00:00.000Z",
          "tickSize": 0.01,
          "contractSize": 1,
          "tradeable": true,
          "marginLevels": [{
              "contracts": 0,
              "initialMargin": 0.02,
              "maintenanceMargin": 0.01
          }, {
              "contracts": 250000,
              "initialMargin": 0.04,
              "maintenanceMargin": 0.02
          }, {
              "contracts": 500000,
              "initialMargin": 0.06,
              "maintenanceMargin": 0.03
          }, {
              "contracts": 2000000,
              "initialMargin": 0.1,
              "maintenanceMargin": 0.05
          }, {
              "contracts": 5000000,
              "initialMargin": 0.15,
              "maintenanceMargin": 0.075
          }],
          "retailMarginLevels": [{
              "contracts": 0,
              "initialMargin": 0.5,
              "maintenanceMargin": 0.25
          }]
      }, {
          "symbol": "in_xbtusd",
          "type": "spot index",
          "tradeable": false
      }, ...],
      "serverTime": "2019-12-12T08:25:26.549Z"
  }

更多内容