Skip to content

Commit e6654d6

Browse files
committed
Corrected README.md
1 parent 7138b4b commit e6654d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ pip3 install -r requirements.txt
6767
The "coins" table receives data from the websocket execution stream or trade history endpoint. Explanations for the columns of the "coins" table:
6868
* ID - row number in the database.
6969
* EXECID - unique code that exchange assigns to any transaction.
70-
* EMI is the identification name of the bot, usually the same as the EMI field of the SQLite "robots" table, taken from the "clOrdID" field. If the "clOrdID" field is empty, then the EMI field contains the value "symbol" and "category" separated by a dot between them execution. If the "clOrdID" field is not empty and contains an EMI, and such an EMI is not in the SQLite "robots" table, then "symbol" value is also assigned.
70+
* EMI is the identification name of the bot taken from the "clOrdID" field, usually the same as the EMI field of the SQLite "robots" table. If the "clOrdID" field is empty, then the EMI field contains the value "symbol" and "category" separated by a dot between them execution. If the "clOrdID" field is not empty and contains an EMI, and such an EMI is not in the SQLite "robots" table, then "symbol" value is also assigned.
7171

7272
| execution|myBot is in the "robots" table|EMI|
7373
| ------------- |:------------------:|:-----:|
7474
| {"clOrdID": "1109594183.myBot", "symbol": "XBTUSD", category: "inverse"}|yes|myBot|
75-
| {"clOrdID": "", "symbol": "XBTUSD", category: "inverse"}|yes|XBTUSD.inverse|
75+
| {"clOrdID": "", "symbol": "XBTUSD", category: "inverse"}|-|XBTUSD.inverse|
7676
| {"clOrdID": "1109594183.myBot", "symbol": "XBTUSD", category: "inverse"}|no|XBTUSD.inverse|
7777

7878
* REFER - the EMI part of "clOrdID" field. E.g. REFER = "myBot" for ```{"clOrdID": "1109594183.myBot"}```
@@ -86,11 +86,11 @@ The "coins" table receives data from the websocket execution stream or trade his
8686
* PRICE - order price.
8787
* THEOR_PRICE - target price.
8888
* TRADE_PRICE - transaction price or estimated funding price. The transaction price may be better or worse than PRICE.
89-
* SUMREAL - entry/exit value, which is expressed in the currency of the transaction instrument and is calculated in accordance with the documentation of the exchange for each instrument.
89+
* SUMREAL - execution value, which is expressed in the currency of the transaction instrument and is calculated in accordance with the documentation of the exchange for each instrument.
9090
* COMMISS - commission for completing a transaction or funding, expressed in the currency of the instrument, and is calculated in accordance with the documentation of the exchange for each instrument. A negative commission value means a rebate.
9191
* TTIME - transaction time received from the exchange.
92-
* DAT - time the current row was written to the database.
93-
* CLORDID - unique order identifier corresponding to the "clOrdID" field, which the exchange registers as an additional parameter when sending an order. For example, "1109594183.myBot" where 1109594183 is a unique order number, "myBot" after the dot is the bot name (EMI). When writing "clOrdID" to the SQLite "coins" table it is split and in this case "myBot" is written to the EMI column and 1109594183 is written to the CLORDID column. An order can be executed in parts, and by receiving information from the exchange using "clOrdID" you can understand which order is being executed and which bot placed it. The "clOrdID" field can be 0. This means that it was funding or the order was made from outside this platform where "clOrdID" was not used.
92+
* DAT - time the current row was written into the database.
93+
* CLORDID - unique order identifier assigned by user corresponding to the "clOrdID" field, which the exchange registers as an additional parameter when sending an order. For example, "1109594183.myBot" where 1109594183 is a unique order number, "myBot" after the dot is the bot name (EMI). When writing "clOrdID" to the SQLite "coins" table it is split and in this case "myBot" is written to the EMI column and 1109594183 is written to the CLORDID column. An order can be executed in parts, and by receiving information from the exchange using "clOrdID" you can understand which order is being executed and which bot placed it. The "clOrdID" field can be 0. This means that it was funding or the order was made from outside this platform where "clOrdID" was not used.
9494
* ACCOUNT - account number.
9595

9696
Explanations for the columns of the SQLite "robots" table:
@@ -130,7 +130,7 @@ TESTNET = "True"
130130

131131
- REFRESH_RATE refers to how often the information on the screen is refreshed, ranging from 1 to 10 times per second.
132132

133-
- TESTNET - choose between the main and test networks.
133+
- TESTNET - choose between the main (False) and test (True) networks.
134134

135135
Create a new file named ```.env.Bitmex``` in the root folder of the program with your settings for the Bitmex exchange if it is in the MARKET_LIST. The file might look like this:
136136

@@ -172,7 +172,7 @@ TESTNET_API_SECRET = "your testnet API secret"
172172

173173
Check the variables LINEAR_SYMBOLS, INVERSE_SYMBOLS, QUANTO_SYMBOLS, SPOT_SYMBOLS, OPTION_SYMBOLS for each exchange where there must be at least one instrument symbol, for example for Bitmex: XBTUSD in INVERSE_SYMBOLS, other variables can be empty. Check the CURRENCIES variable where your account currencies should be. If your account supports multiple currencies, specify them if necessary, for example: "XBt, USDt", where XBt is Bitcoin, USDt is Tether stablecoin.
174174

175-
Check the ```history.ini``` file which keeps the date and time of the last transaction in the format: ```year-month-day hours:minutes:seconds``` (example ```2023-12-08 12:53:36```). You can use any date an time depending on your needs. For instance, if you want to be guaranteed to download all the transactions that were made on your current account, simply specify the year, e.g. 2000, any month, day and time. Thus, the program will download all transactions for your account starting from the very beginning. Transactions and funding will be recorded to the database in the SQLite "coins" table. Please keep in mind that **Bitmex has removed trade history prior to 2020 for [testnet.bitmex.com](https://testnet.bitmex.com) test accounts**, so if your trading activity on [testnet.bitmex.com](https://testnet.bitmex.com) was prior to 2020, you will not be able to get your entire trade history. **Bybit only supports last two years of trading history**. Its API allows trading history to be downloaded in 7-day chunks, so retrieving data for a long period may take time.
175+
Check the ```history.ini``` file which keeps the date and time of the last transaction in the format: ```year-month-day hours:minutes:seconds``` (example ```2023-12-08 12:53:36```). You can use any date and time depending on your needs. For instance, if you want to be guaranteed to download all the transactions that were made on your current account, simply specify the year, e.g. 2000, any month, day and time. Thus, the program will download all transactions for your account starting from the very beginning. Transactions and funding will be recorded to the database in the SQLite "coins" table. Please keep in mind that **Bitmex has removed trade history prior to 2020 for [testnet.bitmex.com](https://testnet.bitmex.com) test accounts**, so if your trading activity on [testnet.bitmex.com](https://testnet.bitmex.com) was prior to 2020, you will not be able to get your entire trade history. **Bybit only supports last two years of trading history**. Its API allows trading history to be downloaded in 7-day chunks, so retrieving data for a long period may take time.
176176

177177
Launch the program:
178178
- in Linux or macOS terminal ```python3 main.py```
@@ -186,7 +186,7 @@ EMI can be equal to the instrument symbol as the default name, for example, if y
186186

187187
Be careful when assigning EMI to bots. Keep in mind that the "clOrdID" field will permanently store the bot's EMI in the exchange registries. You can't change it. Different instruments such as XBTUSD and XBTUSDT may have different settlement currencies such as XBt and USDt. Therefore, you should not assign the same EMI to a bot that first traded XBTUSD and then started trading XBTUSDT. The program will not be able to correctly recalculate the financial result. If you once assigned EMI="myBot" to XBTUSD, then in the future for a bot with EMI="myBot" the instrument must always have the same currency, because... It is impossible to sum XBt and USDt.
188188

189-
Even if you use the same EMI for different instruments but with the same currency, when switching from one instrument to another, you must ensure that the balance is zero. Let's say you traded XBTUSD and you have 100 purchased contracts left. If you change SYMBOL from XBTUSD to ETHUSD, the program will show 100 purchased contracts, but ETHUSD, which will be an error.
189+
Even if you use the same EMI for different instruments but with the same currency, when switching from one instrument to another, you must ensure that the balance is zero. Let's say you traded XBTUSD and you have 100 purchased contracts left. If you change SYMBOL from XBTUSD to ETHUSD, the program will show 100 purchased contracts, but ETHUSD, which will be a mistake.
190190

191191
The best practice when using the program is to assign the only SYMBOL instrument to a specific EMI and never change it again for this EMI.
192192

0 commit comments

Comments
 (0)