Skip to main content

FTX Futures driver for Jesse framework

Project description

FTX FUTURES plugin for Jesse

This is the initial release of the FTX Futures driver for Jesse. At the moment:

  • it is only meant for importing candles and running backtests
  • it supports only Perpetual futures (*-PERP)

Installation

Install by running:

pip install jesse-ftx-futures

Register your driver

Now you need to tell Jesse where to find this driver. We do that by adding it as a driver for importing candles in plugins.py file that exists in the root of Jesse projects. Here is an example where I register a driver for the FTX FUTURES exchange:

from jesse.modes.import_candles_mode.drivers.binance import Binance
from jesse.modes.import_candles_mode.drivers.binance_futures import BinanceFutures
from jesse.modes.import_candles_mode.drivers.binance_inverse_futures import BinanceInverseFutures
from jesse.modes.import_candles_mode.drivers.bitfinex import Bitfinex
from jesse.modes.import_candles_mode.drivers.coinbase import Coinbase
from jesse.modes.import_candles_mode.drivers.testnet_binance_futures import TestnetBinanceFutures

from jesse_ftx_futures import FTXFutures

import_candles_drivers = {
    'Binance': Binance,
    'Binance Futures': BinanceFutures,
    'Binance Inverse Futures': BinanceInverseFutures,
    'Testnet Binance Futures': TestnetBinanceFutures,
    'Bitfinex': Bitfinex,
    'Coinbase': Coinbase,
    'FTX Futures': FTXFutures
}

Now I should be able to run import candles from FTX (in this example for Perpetual):

jesse import-candles 'FTX Futures' 'BTC-USDT' '2012-06-04'

In this example for an expiring future (it won't work on baktesting for now):

jesse import-candles 'FTX Futures' 'BTC-0924' '2012-06-04'

Add new config values for running backtests

Usually the reason for importing candles in the first place is to run backtests on them. So we need to tell Jesse where to find the config values for our newly added exchange in order for it run backtests on it.

We can do that by opening config.py and coping and pasting values from an existing exchange such as Binance Futures and changing the values according to our needs for out exchange:

# https://www.ftx.com
'FTX Futures': {
    'fee': 0.0006,

    # backtest mode only: accepted are 'spot' and 'futures'
    'type': 'futures',

    # futures mode only
    'settlement_currency': 'USDT',
    # accepted values are: 'cross' and 'isolated'
    'futures_leverage_mode': 'isolated',
    # 1x, 2x, 10x, 50x, etc. Enter as integers
    'futures_leverage': 3,

    # used for spot exchange only
    'assets': [
        {'asset': 'USDT', 'balance': 10_000},
    ],
},

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jesse-ftx-futures-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jesse_ftx_futures-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file jesse-ftx-futures-0.1.0.tar.gz.

File metadata

  • Download URL: jesse-ftx-futures-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for jesse-ftx-futures-0.1.0.tar.gz
Algorithm Hash digest
SHA256 643f3c690d1b1a45188f133b41b33d7022f66080538a503c7a37608d6488275f
MD5 91179938694d5baf6c82d2545cbd869a
BLAKE2b-256 a36d5ee3dc932df093b3f4f2d0b84baf8feb815c5fd702cc7c47192aef643c92

See more details on using hashes here.

File details

Details for the file jesse_ftx_futures-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jesse_ftx_futures-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for jesse_ftx_futures-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52ed898e47fa44c8e3af06f015bcdb710ec515d476ba6e7f1907727fbf56d576
MD5 1ed1a366d25953c591395772debbd8a0
BLAKE2b-256 d70babf8dd07dbc31f335ade2988bb9054653c34308f25f73b13bb275762aa69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page