Futures_Kraken is a futures exchange for mercenaries.

Author: The Little Dream, Created: 2019-12-18 10:36:35, Updated: 2019-12-18 10:40:52

Futures_Kraken is a futures exchange for mercenaries.

The contract information page:https://www.kraken.com/zh-cn/features/futures

The API documentation page:https://support.kraken.com/hc/en-us/categories/360001806372-Futures-API

Summary

  • One contract is for 1 USD, some contracts are for the currency itself and use the currency as collateral. Some contracts use BTC as collateral.

  • Leverage up to 50 times.

  • The contract delivery time is related to: 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.
    
  • Keeping information Holding interface is not provided, holding freezes, holding collateral occupies, position leverage, position gains and losses.

  • Do not support K-line interface, callGetRecordsI'm not supporting it.

  • Do not supportGetOrderIn the case of a phone call, you can check the order interface and call not support.

  • tick market interface, only buy one sell one, current price, does not support 24 hours maximum minimum price. GetTicker's High Low uses current buy one, sell one fill.

  • The transaction pairs are set, setXBT_USDThis is a contract for BTC, set in the strategy code.exchange.SetContractType("swap")For a perpetual contract in BTC, the corresponding exchange code is:pi_xbtusd, setexchange.SetContractType("month")For example, the monthly contract for BTC.fi_xbtusd_191227I'm not sure. If you want to trade:pv_xrpxbtThe contract requires the transaction pair to be set to:XRP_XBT, callexchange.SetContractType("swap")The function ≠ ∞

  • GetAccountThe function returns the data.FrozenStocks0 because the holdings and the pending holdings are written together in the exchange interface and cannot be distinguished.StocksThe amount of money available at the moment.

  • SetMarginLevelLeverage cannot be set, the leverage size can only be set on the exchange page (exchange API does not provide an interface for setting the leverage, nor is the parameter for setting the leverage in the interface below)

  • Contract code type

    • Currency contracts This is a continuous: pi_xbtusd Delivery:fi_xbtusd_191227 月合约fi_bchusd_200327 季度合约The delivery time is UTC time.

    • Coming to a Contract This is a permanent: pv_xrpxbt, using BTC as collateral.

    Contract information can be accessed through the exchange's 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"
    }
    

More