FTXの自動取引プログラムのサンプルを作成しました。
https://github.com/edo1z/ftx-sample — github.com
FTX-sample
FTX-sample is the Automatic trading program for FTX
How to use
- Register your account on FTX.
- Create an FTX API key and set it in the .env file.
- Install and start this program.
API Key
- Go to https://ftx.com/profile and click the “Create API Key” button in the “API Key” section. Copy the created API key and API secret key.
Install and start
$ git clone [email protected]:edo1z/ftx-sample.git$ cd ftx-sample$ npm install$ vim .env$ vim config/index.js$ node main.env
API_KEY=XXXXXXXXXXXXXXXXXXXXAPI_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXconfig/index.js
- This file is used for automatic transaction settings.
module.exports = { amountPerTransaction: 1, minTradeAmountDiff: 750000, maxSpreadRate: 0.0015, minProfitRate: 0.0001, maxLossRate: 0.001, maxLossRateOfModifyOrder: 0.0005, orderTimeLimit: 10, counterOrderTimeLimit: 30, markets: ['ETH-PERP'],},amountPerTransactionis the amount per transaction ($)- For example, if this parameter is 100 and ETH is $350, you will buy and sell about 0.28 ETH in one trade.
minTradeAmountDiffis the difference between Bid and Ask size over a period of time.maxSpreadRateis the maximum spread that can be traded automatically.minProfitRateis the profit rate when making a profitable order by automatic tradingmaxLossRateis the loss rate when making a loss cut order for the marketmaxLossRateOfModifyOrderis the loss rate when resetting the order price to the current priceorderTimeLimitis the valid order time (seconds)counterOrderTimeLimitis the valid time for counter orders. When the valid time expires, reset the current price.marketsis a list of markets for automatic trading
License
MIT