You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rest-api.md
+54-49Lines changed: 54 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,11 @@ This method will work for all arguments - check the "show" command for a list of
140
140
# Get the status of the bot
141
141
ping = client.ping()
142
142
print(ping)
143
+
144
+
# Add pairs to blacklist
145
+
client.blacklist("BTC/USDT", "ETH/USDT")
146
+
# Add pairs to blacklist by supplying a list
147
+
client.blacklist(*listPairs)
143
148
# ...
144
149
```
145
150
@@ -155,63 +160,63 @@ freqtrade-client help
155
160
Possible commands:
156
161
157
162
available_pairs
158
-
Return available pair (backtest data) based on timeframe / stake_currency selection
163
+
Return available pair (backtest data) based on timeframe / stake_currency selection
159
164
160
165
:param timeframe: Only pairs with this timeframe available.
161
166
:param stake_currency: Only pairs that include this timeframe
162
167
163
168
balance
164
-
Get the account balance.
169
+
Get the account balance.
165
170
166
171
blacklist
167
-
Show the current blacklist.
172
+
Show the current blacklist.
168
173
169
174
:param add: List of coins to add (example: "BNB/BTC")
170
175
171
176
cancel_open_order
172
-
Cancel open order for trade.
177
+
Cancel open order for trade.
173
178
174
179
:param trade_id: Cancels open orders for this trade.
175
180
176
181
count
177
-
Return the amount of open trades.
182
+
Return the amount of open trades.
178
183
179
184
daily
180
-
Return the profits for each day, and amount of trades.
185
+
Return the profits for each day, and amount of trades.
181
186
182
187
delete_lock
183
-
Delete (disable) lock from the database.
188
+
Delete (disable) lock from the database.
184
189
185
190
:param lock_id: ID for the lock to delete
186
191
187
192
delete_trade
188
-
Delete trade from the database.
193
+
Delete trade from the database.
189
194
Tries to close open orders. Requires manual handling of this asset on the exchange.
190
195
191
196
:param trade_id: Deletes the trade with this ID from the database.
192
197
193
198
forcebuy
194
-
Buy an asset.
199
+
Buy an asset.
195
200
196
201
:param pair: Pair to buy (ETH/BTC)
197
202
:param price: Optional - price to buy
198
203
199
204
forceenter
200
-
Force entering a trade
205
+
Force entering a trade
201
206
202
207
:param pair: Pair to buy (ETH/BTC)
203
208
:param side: 'long' or 'short'
204
209
:param price: Optional - price to buy
205
210
206
211
forceexit
207
-
Force-exit a trade.
212
+
Force-exit a trade.
208
213
209
214
:param tradeid: Id of the trade (can be received via status command)
210
215
:param ordertype: Order type to use (must be market or limit)
211
216
:param amount: Amount to sell. Full sell if not given
212
217
213
218
health
214
-
Provides a quick health check of the running bot.
219
+
Provides a quick health check of the running bot.
215
220
216
221
lock_add
217
222
Manually lock a specific pair
@@ -222,82 +227,82 @@ lock_add
222
227
:param reason: Reason for the lock
223
228
224
229
locks
225
-
Return current locks
230
+
Return current locks
226
231
227
232
logs
228
-
Show latest logs.
233
+
Show latest logs.
229
234
230
235
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
231
236
232
237
pair_candles
233
-
Return live dataframe for <pair><timeframe>.
238
+
Return live dataframe for <pair><timeframe>.
234
239
235
240
:param pair: Pair to get data for
236
241
:param timeframe: Only pairs with this timeframe available.
237
242
:param limit: Limit result to the last n candles.
238
243
239
244
pair_history
240
-
Return historic, analyzed dataframe
245
+
Return historic, analyzed dataframe
241
246
242
247
:param pair: Pair to get data for
243
248
:param timeframe: Only pairs with this timeframe available.
244
249
:param strategy: Strategy to analyze and get values for
245
250
:param timerange: Timerange to get data for (same format than --timerange endpoints)
246
251
247
252
performance
248
-
Return the performance of the different coins.
253
+
Return the performance of the different coins.
249
254
250
255
ping
251
-
simple ping
256
+
simple ping
252
257
253
258
plot_config
254
-
Return plot configuration if the strategy defines one.
259
+
Return plot configuration if the strategy defines one.
255
260
256
261
profit
257
-
Return the profit summary.
262
+
Return the profit summary.
258
263
259
264
reload_config
260
-
Reload configuration.
265
+
Reload configuration.
261
266
262
267
show_config
263
-
Returns part of the configuration, relevant for trading operations.
268
+
Returns part of the configuration, relevant for trading operations.
264
269
265
270
start
266
-
Start the bot if it's in the stopped state.
271
+
Start the bot if it's in the stopped state.
267
272
268
273
pause
269
-
Pause the bot if it's in the running state. If triggered on stopped state will handle open positions.
274
+
Pause the bot if it's in the running state. If triggered on stopped state will handle open positions.
270
275
271
276
stats
272
-
Return the stats report (durations, sell-reasons).
277
+
Return the stats report (durations, sell-reasons).
273
278
274
279
status
275
-
Get the status of open trades.
280
+
Get the status of open trades.
276
281
277
282
stop
278
-
Stop the bot. Use `start` to restart.
283
+
Stop the bot. Use `start` to restart.
279
284
280
285
stopbuy
281
-
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
286
+
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
282
287
283
288
strategies
284
-
Lists available strategies
289
+
Lists available strategies
285
290
286
291
strategy
287
-
Get strategy details
292
+
Get strategy details
288
293
289
294
:param strategy: Strategy class name
290
295
291
296
sysinfo
292
-
Provides system information (CPU, RAM usage)
297
+
Provides system information (CPU, RAM usage)
293
298
294
299
trade
295
-
Return specific trade
300
+
Return specific trade
296
301
297
302
:param trade_id: Specify which trade to get.
298
303
299
304
trades
300
-
Return trades history, sorted by id
305
+
Return trades history, sorted by id
301
306
302
307
:param limit: Limits trades to the X last trades. Max 500 trades.
303
308
:param offset: Offset by this amount of trades.
@@ -316,10 +321,10 @@ list_custom_data
316
321
:param key: str, optional - Key of the custom-data
317
322
318
323
version
319
-
Return the version of the bot.
324
+
Return the version of the bot.
320
325
321
326
whitelist
322
-
Show the current whitelist.
327
+
Show the current whitelist.
323
328
324
329
325
330
```
@@ -339,32 +344,32 @@ All endpoints in the below table need to be prefixed with the base URL of the AP
339
344
| `/reload_config` | POST | Reloads the configuration file.
340
345
| `/trades` | GET | List last trades. Limited to 500 trades per call.
341
346
| `/trade/<tradeid>` | GET | Get specific trade.<br/>*Params:*<br/>- `tradeid` (`int`)
342
-
| `/trades/<tradeid>` | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
343
-
| `/trades/<tradeid>/open-order` | DELETE | Cancel open order for this trade.<br/>*Params:*<br/>- `tradeid` (`int`)
344
-
| `/trades/<tradeid>/reload` | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
347
+
| `/trades/<tradeid>` | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
348
+
| `/trades/<tradeid>/open-order` | DELETE | Cancel open order for this trade.<br/>*Params:*<br/>- `tradeid` (`int`)
349
+
| `/trades/<tradeid>/reload` | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
345
350
| `/show_config` | GET | Shows part of the current configuration with relevant settings to operation.
346
351
| `/logs` | GET | Shows last log messages.
347
352
| `/status` | GET | Lists all open trades.
348
353
| `/count` | GET | Displays number of trades used and available.
349
-
| `/entries` | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
350
-
| `/exits` | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
351
-
| `/mix_tags` | GET | Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
354
+
| `/entries` | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
355
+
| `/exits` | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
356
+
| `/mix_tags` | GET | Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
352
357
| `/locks` | GET | Displays currently locked pairs.
353
-
| `/locks` | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional.<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<until>` (`datetime`)<br/>- `[side]` (`str`)<br/>- `[reason]` (`str`)
354
-
| `/locks/<lockid>` | DELETE | Deletes (disables) the lock by id.<br/>*Params:*<br/>- `lockid` (`int`)
358
+
| `/locks` | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional.<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<until>` (`datetime`)<br/>- `[side]` (`str`)<br/>- `[reason]` (`str`)
359
+
| `/locks/<lockid>` | DELETE | Deletes (disables) the lock by id.<br/>*Params:*<br/>- `lockid` (`int`)
355
360
| `/profit` | GET | Display a summary of your profit/loss from close trades and some stats about your performance.
356
361
| `/forceexit` | POST | Instantly exits the given trade (ignoring `minimum_roi`), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified). If `all` is supplied as the `tradeid`, then all currently open trades will be forced to exit.<br/>*Params:*<br/>- `<tradeid>` (`int` or `str`)<br/>- `<ordertype>` (`str`)<br/>- `[amount]` (`float`)
357
362
| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Rate is optional. (`force_entry_enable` must be set to True)<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<side>` (`str`)<br/>- `[rate]` (`float`)
358
363
| `/performance` | GET | Show performance of each finished trade grouped by pair.
359
364
| `/balance` | GET | Show account balance per currency.
360
-
| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).<br/>*Params:*<br/>- `<n>` (`int`)
361
-
| `/weekly` | GET | Shows profit or loss per week, over the last n days (n defaults to 4).<br/>*Params:*<br/>- `<n>` (`int`)
362
-
| `/monthly` | GET | Shows profit or loss per month, over the last n days (n defaults to 3).<br/>*Params:*<br/>- `<n>` (`int`)
365
+
| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).<br/>*Params:*<br/>- `timescale` (`int`)
366
+
| `/weekly` | GET | Shows profit or loss per week, over the last n days (n defaults to 4).<br/>*Params:*<br/>- `timescale` (`int`)
367
+
| `/monthly` | GET | Shows profit or loss per month, over the last n days (n defaults to 3).<br/>*Params:*<br/>- `timescale` (`int`)
363
368
| `/stats` | GET | Display a summary of profit / loss reasons as well as average holding times.
364
369
| `/whitelist` | GET | Show the current whitelist.
365
370
| `/blacklist` | GET | Show the current blacklist.
366
-
| `/blacklist` | POST | Adds the specified pair to the blacklist.<br/>*Params:*<br/>- `pair` (`str`)
367
-
| `/blacklist` | DELETE | Deletes the specified list of pairs from the blacklist.<br/>*Params:*<br/>- `[pair,pair]` (`list[str]`)
371
+
| `/blacklist` | POST | Adds the specified pair to the blacklist.<br/>*Params:*<br/>- `blacklist` (`str`)
372
+
| `/blacklist` | DELETE | Deletes the specified list of pairs from the blacklist.<br/>*Params:*<br/>- `[pair,pair]` (`list[str]`)
368
373
| `/pair_candles` | GET | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha**
369
374
| `/pair_candles` | POST | Returns dataframe for a pair / timeframe combination while the bot is running, filtered by a provided list of columns to return. **Alpha**<br/>*Params:*<br/>- `<column_list>` (`list[str]`)
370
375
| `/pair_history` | GET | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. **Alpha**
@@ -488,7 +493,7 @@ To properly configure your reverse proxy (securely), please consult it's documen
488
493
### OpenAPI interface
489
494
490
495
To enable the builtin openAPI interface (Swagger UI), specify `"enable_openapi": true` in the api_server configuration.
491
-
This will enable the Swagger UI at the `/docs` endpoint. By default, that's running at http://localhost:8080/docs - but it'll depend on your settings.
496
+
This will enable the Swagger UI at the `/docs` endpoint. By default, that's running at <http://localhost:8080/docs> - but it'll depend on your settings.
0 commit comments