Deribit Testnet Copy Trader is a python script that copy trade from Deribit mainnet to testnet.
Some instruments in Deribit testnet may have limited liquidity and create addition challenges for testing scripts. By copying mainnet trades to testnet, it can creates a more liquid testing environment.
Table of Contents
-
Register a mainnet account with Deribit (Affiliated link, Non-affiliated link).
-
Register a testnet account with Deribit (Non-affiliated link).
-
Fund testing token to testnet account. (Do not send real coin to testnet deposite address)
- Select coin type (BTC, ETH, SOL) on top left corner
- Click "Generate a deposit address"
- Copy deposit address
- Click on "here" of "You can fund your account with internal test coins here. In this case, please don't deposit more than 10 BTC to leave some coins for other traders as well." or https://test.deribit.com/dericoin/BTC/deposit.
- Paste the deposit address.
- Input the deposit amount.
- Click "Make deposit".
-
Clone to local
git clone https://github.com/SilverBeavers/deribit_testnet_copy_trader.git
- Add mainnet API key to "credentials.py"
- Click on User Name on top right corner > "My Account" > "API" > "Add New Key".
- Select "Trade" > "read" > "Create a new API key".
- Copy "Client ID" and "Client Secret" to "credentials.py".
- Add testnet API key to "credentials.py"
- Click on User Name on top right corner > "My Account" > "API" > "Add New Key".
- Select "Trade" > "read" > "Create a new API key".
- Copy "Client ID" and "Client Secret" to "credentials.py".
- Input parameters to "user_settings.py"
- Run in python
python deribit_testnet_copy_trader.py
deribit_testnet_copy_trader(_instrument_names, _trade_amount)
Parameter | Type | Description |
---|---|---|
_instrument_names | List | The instrument name list which to be monitored |
_trade_amount | List | The trade amount list for each side of trade |
deribit_limit_trade(deribit_client, instrument_name, is_buy, trade_amount, price)
Parameter | Type | Description |
---|---|---|
deribit_client | WS_Client | Deribit websocket client |
is_buy | bool | Whether buy or sell, True: buy, False: sell |
trade_amount | float | The amount of contract wish to be traded |
price | float | The limit price |
- GitHub: https://github.com/SilverBeavers
- Project Link: https://github.com/SilverBeavers/deribit_testnet_copy_trader
- Twitter: https://twitter.com/Silver_Beavers