-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2839 lines (2839 loc) · 80.1 KB
/
Copy pathopenapi.yaml
File metadata and controls
2839 lines (2839 loc) · 80.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Gunbot SDK Python
version: v1
description: "The Gunbot SDK for Python enables you to programmatically interact with Gunbot,\
\ a\nself-hosted trading bot for crypto, ETFs and stocks.\n\nIt's a single API\
\ client with which you can control automated trading operations on\nmany exchanges.\
\ Gunbot includes unique built-in strategies, it can also run custom strategy\
\ code in js. This client lets you orchestrate and monitor trading bots.\n\nThe\
\ API client accepts and returns data in JSON format.\n\nIt uses standard HTTP\
\ response codes to indicate request outcomes:\n\n- **200 OK** \u2013 The request\
\ was successful \n- **400 Bad Request** \u2013 The request was invalid or cannot\
\ be processed \n- **401 Unauthorized** \u2013 Authentication failed or the user\
\ lacks permissions \n- **500 Internal Server Error** \u2013 A server-side error\
\ occurred \n\n**Gunbot Workflow**\n\n1. Add the trading pair to the configuration\
\ with a valid strategy. \n2. Start the core to activate trading operations.\
\ \n\nAfter completing these steps you can access market-data and trading endpoints.\n\
Gunbot will actively monitor and execute strategies for the specified pairs.\n\
\n**Encryption Helpers**\n\nGunbot uses password encryption. Refer to the original\
\ documentation for helper\nsnippets in JavaScript (Browser/Node.js), Bash and\
\ Python.\n\n**Supported Exchanges**\n\nGunbot ships with native connectors for\
\ more than two dozen exchanges, covering\nspot, futures and on-chain derivatives.\
\ \n\n| Exchange | Spot | Futures / Perps | DeFi (on-chain) | Extra notes |\n\
| --- | :---: | :---: | :---: | --- |\n| **Binance** | \u2714\uFE0F | \u2714\uFE0F\
\ (USD-M & COIN-M) | | Largest liquidity |\n| **Binance US** | \u2714\uFE0F |\
\ | | US-regulated arm |\n| **Bitget** | \u2714\uFE0F | \u2714\uFE0F (USDT &\
\ UM perps) | | |\n| **Bybit** | \u2714\uFE0F | \u2714\uFE0F (USDT & inverse\
\ perps) | | |\n| **OKX** | \u2714\uFE0F | \u2714\uFE0F (Perps & dated futures)\
\ | | |\n| **Kraken** | \u2714\uFE0F | \u2714\uFE0F (via Kraken Futures) | \
\ | |\n| **KuCoin** | \u2714\uFE0F | | | |\n| **Gate.io** | \u2714\uFE0F |\
\ | | |\n| **MEXC** | \u2714\uFE0F | | | |\n| **BingX** | \u2714\uFE0F |\
\ | | |\n| **Crypto.com** | \u2714\uFE0F | | | |\n| **Huobi Global** | \u2714\
\uFE0F | | | |\n| **Bitfinex** | \u2714\uFE0F | | | |\n| **HitBTC** | \u2714\
\uFE0F | | | |\n| **Coinbase Advanced Trade** | \u2714\uFE0F | | | Former\
\ Coinbase Pro |\n| **CEX.io** | \u2714\uFE0F | | | |\n| **Poloniex** | \u2714\
\uFE0F | | | |\n| **Alpaca** (stocks & crypto) | \u2714\uFE0F | | | |\n\
| **dYdX (v3/v4)** | | \u2714\uFE0F | \u2714\uFE0F | Perpetual DEX |\n| **HyperLiquid**\
\ | \u2714\uFE0F | \u2714\uFE0F | \u2714\uFE0F | DeFi perps |\n| **PancakeSwap**\
\ | | \u2714\uFE0F | \u2714\uFE0F | BSC DEX |\n| **Bitmex / Bitmex Testnet**\
\ | | \u2714\uFE0F | | |"
contact:
name: Gunbot
url: https://www.gunbot.com
email: support@gunbot.freshdesk.com
license:
name: MIT License
url: https://opensource.org/licenses/MIT
servers:
- url: http://your-gunbot-instance.com:3000/api/v1
description: Local Gunbot instance (HTTP). Replace `your-gunbot-instance.com` with
the actual domain or IP. The port is identical to the GUI port.
- url: https://your-gunbot-instance.com:3000/api/v1
description: Gunbot instance (HTTPS). When not using the API on localhost, make
sure to configure https.
security:
- BearerAuth: []
tags:
- name: Gunbot
description: All Gunbot endpoints
paths:
/auth/login:
post:
tags:
- Gunbot
summary: "authLogin \u2014 authLogin \u2014 Login User"
description: Authenticate a user and obtain a JSON Web Token (JWT).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoginRequest'
responses:
'200':
description: Successful authentication
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: auth_login
/auth/status:
get:
tags:
- Gunbot
summary: "authStatus \u2014 authStatus \u2014 Get Authentication Status"
description: Validate the current session's authentication status using the
provided token.
security:
- BearerAuth: []
responses:
'200':
description: Authentication status retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AuthStatusResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: auth_status
/balances:
post:
tags:
- Gunbot
summary: "balances \u2014 balances \u2014 Get Asset Balances"
description: Retrieve asset balances across exchanges for the authenticated
user.
security:
- BearerAuth: []
responses:
'200':
description: Balances retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/BalancesResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: balances
/assets/total:
post:
tags:
- Gunbot
summary: "assetsTotal \u2014 assetsTotal \u2014 Get Historical Total Asset Value"
description: Retrieve historical total asset value in a base currency over a
time range.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssetsTotalRequest'
responses:
'200':
description: Historical asset values retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/AssetsTotalResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: assets_total
/pairs:
get:
tags:
- Gunbot
summary: "pairs \u2014 pairs \u2014 Get Trading Pairs"
description: Retrieve a list of trading pairs for a specified exchange. The
`exchange` parameter should be URL-encoded if it contains special characters
(e.g., `#` as `%23`).
security:
- BearerAuth: []
parameters:
- name: exchange
in: query
required: true
description: Exchange name (e.g., `binance%233`).
schema:
type: string
example: binance%233
responses:
'200':
description: Trading pairs retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/PairsResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: pairs
/pairs/detailed:
get:
tags:
- Gunbot
summary: "pairsDetailed \u2014 pairsDetailed \u2014 Get Detailed Trading Pairs"
description: Retrieve detailed trading pair information for a specified exchange.
The `exchange` parameter should be URL-encoded if it contains special characters.
security:
- BearerAuth: []
parameters:
- name: exchange
in: query
required: true
description: Exchange name (e.g., `binance%233`).
schema:
type: string
example: binance%233
responses:
'200':
description: Detailed trading pair information retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/PairsDetailedResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: pairs_detailed
/config/full:
get:
tags:
- Gunbot
summary: "configFull \u2014 configFull \u2014 Get Full Configuration"
description: Retrieve the entire application configuration.
security:
- BearerAuth: []
responses:
'200':
description: Full configuration retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigFullResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_full
/config/update:
post:
tags:
- Gunbot
summary: "configUpdate \u2014 configUpdate \u2014 Update Full Configuration"
description: Update the entire configuration with a new object.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigUpdateRequest'
responses:
'200':
description: Configuration updated
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigUpdateResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_update
/config/pair/add:
post:
tags:
- Gunbot
summary: "configPairAdd \u2014 configPairAdd \u2014 Add Trading Pair to Configuration"
description: Add a new trading pair to the configuration.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigPairAddRequest'
responses:
'200':
description: Trading pair added
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_pair_add
/config/pair/remove:
post:
tags:
- Gunbot
summary: "configPairRemove \u2014 configPairRemove \u2014 Remove Trading Pair\
\ from Configuration"
description: Remove a trading pair from the configuration.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigPairRemoveRequest'
responses:
'200':
description: Trading pair removed
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_pair_remove
/config/strategy/add:
post:
tags:
- Gunbot
summary: "configStrategyAdd \u2014 configStrategyAdd \u2014 Add Trading Strategy\
\ to Configuration"
description: Add a new trading strategy to the configuration.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigStrategyAddRequest'
responses:
'200':
description: Trading strategy added
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_strategy_add
/config/strategy/remove:
post:
tags:
- Gunbot
summary: "configStrategyRemove \u2014 configStrategyRemove \u2014 Remove Trading\
\ Strategy from Configuration"
description: Remove a trading strategy from the configuration.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigStrategyRemoveRequest'
responses:
'200':
description: Trading strategy removed
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: config_strategy_remove
/files/acvar:
get:
tags:
- Gunbot
summary: "filesAcvar \u2014 filesAcvar \u2014 List AutoConfig Variable Files"
description: List filenames of available AutoConfig variable files.
security:
- BearerAuth: []
responses:
'200':
description: AutoConfig variable files listed
content:
application/json:
schema:
$ref: '#/components/schemas/FileListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_acvar
/files/acvar/get:
post:
tags:
- Gunbot
summary: "filesAcvarGet \u2014 filesAcvarGet \u2014 Get AutoConfig Variable\
\ File Content"
description: Retrieve the content of a specified AutoConfig variable file.
security:
- BearerAuth: []
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/FileGetRequest'
responses:
'200':
description: AutoConfig variable file content retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/FileAclarContentResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_acvar_get
/files/autoconfig/write:
post:
tags:
- Gunbot
summary: "filesAutoconfigWrite \u2014 filesAutoconfigWrite \u2014 Write to autoconfig.json\
\ File"
description: Write content to the `autoconfig.json` file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileWriteRequest'
responses:
'200':
description: Content written to autoconfig.json
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_autoconfig_write
/files/backup:
post:
tags:
- Gunbot
summary: "filesBackup \u2014 filesBackup \u2014 List Backup Files"
description: List available backup files.
security:
- BearerAuth: []
responses:
'200':
description: Backup files listed
content:
application/json:
schema:
$ref: '#/components/schemas/FileListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_backup
/files/backup/get:
post:
tags:
- Gunbot
summary: "filesBackupGet \u2014 filesBackupGet \u2014 Get Backup File Content"
description: Retrieve the content of a specified backup config file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileGetRequest'
responses:
'200':
description: Backup file content retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/FileContentResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_backup_get
/files/custom-editor/get:
post:
tags:
- Gunbot
summary: "filesCustomEditorGet \u2014 filesCustomEditorGet \u2014 Get Custom\
\ Strategy Editor File Content"
description: Retrieve the content of the custom strategy editor file.
security:
- BearerAuth: []
responses:
'200':
description: Custom strategy editor file content retrieved
content:
text/plain:
schema:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_custom_editor_get
/files/custom-editor/write:
post:
tags:
- Gunbot
summary: "filesCustomEditorWrite \u2014 filesCustomEditorWrite \u2014 Write\
\ to Custom Strategy Editor File"
description: Write content to the custom strategy editor file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileWriteRequest'
responses:
'200':
description: Content written to custom strategy editor file
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_custom_editor_write
/files/state:
get:
tags:
- Gunbot
summary: "filesState \u2014 filesState \u2014 List State Files"
description: List filenames of available state files.
security:
- BearerAuth: []
responses:
'200':
description: State files listed
content:
application/json:
schema:
$ref: '#/components/schemas/FileListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_state
/files/state/get:
post:
tags:
- Gunbot
summary: "filesStateGet \u2014 filesStateGet \u2014 Get State File Content"
description: Retrieve the content of a specific state file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileGetRequest'
responses:
'200':
description: State file content retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/FileStateContentResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_state_get
/files/strategy:
get:
tags:
- Gunbot
summary: "filesStrategy \u2014 filesStrategy \u2014 List Custom Strategy Files"
description: List filenames of available custom strategy files (JavaScript files).
security:
- BearerAuth: []
responses:
'200':
description: Custom strategy files listed
content:
application/json:
schema:
$ref: '#/components/schemas/FileListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_strategy
/files/strategy/get:
post:
tags:
- Gunbot
summary: "filesStrategyGet \u2014 filesStrategyGet \u2014 Get Custom Strategy\
\ File Content"
description: Retrieve the content of a specific custom strategy file. The response
is the raw content of the file, likely JavaScript code, wrapped in a JSON
object.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileGetRequest'
responses:
'200':
description: Custom strategy file content retrieved. Example shows an empty
object, actual content would be the file's text if it were wrapped.
content:
text/plain:
schema:
type: string
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_strategy_get
/files/strategy/write:
post:
tags:
- Gunbot
summary: "filesStrategyWrite \u2014 filesStrategyWrite \u2014 Write to Custom\
\ Strategy File"
description: Write JavaScript code content to a specific custom strategy file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileStrategyWriteRequest'
responses:
'200':
description: Content written to custom strategy file
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_strategy_write
/files/strategy/delete:
post:
tags:
- Gunbot
summary: "filesStrategyDelete \u2014 filesStrategyDelete \u2014 Delete Custom\
\ Strategy File"
description: Delete a specific custom strategy file.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FileGetRequest'
responses:
'200':
description: Custom strategy file deleted
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessStatusResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: files_strategy_delete
/market/candles:
get:
tags:
- Gunbot
summary: "marketCandles \u2014 marketCandles \u2014 Get Market Candles (OHLCV)"
description: Retrieve historical OHLCV candle data for a trading pair. The `key`
parameter (exchange/pair) must be URL-encoded.
security:
- BearerAuth: []
parameters:
- name: key
in: query
required: true
description: URL-encoded trading pair key (e.g., `binance%2FUSDT-PEPE`).
schema:
type: string
example: binance%2FUSDT-PEPE
responses:
'200':
description: Candle data retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/MarketCandlesResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: market_candles
/market/orderbook:
get:
tags:
- Gunbot
summary: "marketOrderbook \u2014 marketOrderbook \u2014 Get Market Orderbook"
description: Retrieve current order book (bids and asks) for a trading pair.
The `key` parameter must be URL-encoded.
security:
- BearerAuth: []
parameters:
- name: key
in: query
required: true
description: URL-encoded trading pair key (e.g., `binance%2FUSDT-PEPE`).
schema:
type: string
example: binance%2FUSDT-PEPE
responses:
'200':
description: Order book data retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/MarketOrderbookResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: market_orderbook
/coremem/raw:
post:
tags:
- Gunbot
summary: "corememRequest \u2014 corememRequest \u2014 Get Raw Core Memory Data\
\ for a Pair"
description: Retrieve raw core memory data for a specific trading pair, optionally
filtered by elements.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CoreMemRawRequest'
responses:
'200':
description: Raw core memory data retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/CoreMemRawResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: coremem_request
/coremem:
post:
tags:
- Gunbot
summary: "coremem \u2014 coremem \u2014 Get Core Memory Snapshot (All Pairs)"
description: Retrieve a snapshot of relevant core memory data for all active
trading pairs. Data is slightly delayed and transformed for frontend use.
security:
- BearerAuth: []
responses:
'200':
description: Core memory snapshot retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/CoreMemSnapshotResponse'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: coremem
/coremem/single:
post:
tags:
- Gunbot
summary: "corememSingle \u2014 corememSingle \u2014 Get Core Memory Snapshot\
\ (Single Pair)"
description: Retrieve a snapshot of relevant core memory data for a single active
trading pair. Data is slightly delayed and transformed.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CoreMemSingleRequest'
responses:
'200':
description: Single pair core memory snapshot retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/CoreMemSnapshotResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: coremem_single
/chart/data:
post:
tags:
- Gunbot
summary: "chartData \u2014 chartData \u2014 Get Chart Data (Candles and Indicators)"
description: Retrieve chart data, including candles and indicators, for a specific
trading pair.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChartDataRequest'
responses:
'200':
description: Chart data retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/ChartDataResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: chart_data
/chart/marks:
get:
tags:
- Gunbot
summary: "chartMarks \u2014 chartMarks \u2014 Get Chart Timescale Marks"
description: Retrieve chart timescale marks (annotations like buy/sell triggers)
for a pair and interval.
security:
- BearerAuth: []
parameters:
- name: exchange
in: query
required: true
schema:
type: string
example: binance
- name: pair
in: query
required: true
schema:
type: string
example: USDT-XRP
- name: interval
in: query
required: true
description: Time interval in minutes.
schema:
type: string
example: '15'
- name: startTime
in: query
required: true
description: Start time (UNIX timestamp seconds).
schema:
type: string
example: '0'
- name: endTime
in: query
required: true
description: End time (UNIX timestamp seconds).
schema:
type: string
example: '2114377200'
responses:
'200':
description: Chart marks retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/ChartMarksResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: chart_marks
/pnl/overview:
post:
tags:
- Gunbot
summary: "pnlOverview \u2014 pnlOverview \u2014 Get PNL Overview"
description: Retrieve an overview of PNL data, summarized over time periods
and trading pairs.
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PnlOverviewRequest'
responses:
'200':
description: PNL overview retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/PnlOverviewResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: pnl_overview
/pnl/daily:
get:
tags:
- Gunbot
summary: "pnlDaily \u2014 pnlDaily \u2014 Get Daily PNL for a Trading Key"
description: Retrieve daily PNL data for a specific trading key within a time
range. The `key` parameter must be URL-encoded.
security:
- BearerAuth: []
parameters:
- name: key
in: query
required: true
description: URL-encoded trading key (e.g. `binance%2FUSDT-XRP`).
schema:
type: string
example: binance%2FUSDT-XRP
- name: startTimestamp
in: query
required: true
description: Start timestamp (ms).
schema:
type: integer
format: int64
example: 0
- name: endTimestamp
in: query
required: true
description: End timestamp (ms).
schema:
type: integer
format: int64
example: 1733307452623
responses:
'200':
description: Daily PNL data retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/PnlDailyResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
operationId: pnl_daily
/pnl/daily/paginated:
get:
tags:
- Gunbot
summary: "pnlDailyPaginated \u2014 pnlDailyPaginated \u2014 Get Paginated Daily\
\ PNL for a Trading Key"
description: Retrieve paginated daily PNL data for a specific trading key. The
`key` parameter must be URL-encoded.
security:
- BearerAuth: []
parameters:
- name: key
in: query
required: true
description: URL-encoded trading key.
schema:
type: string
example: binance%2FUSDT-XRP
- name: pageNum
in: query
required: true
description: Page number.
schema:
type: integer
example: 1
- name: pageSize
in: query
required: true
description: Records per page.
schema:
type: integer
example: 10
- name: endTime
in: query
required: true
description: End timestamp (ms).
schema:
type: integer
format: int64
example: 1733307452649
responses:
'200':
description: Paginated daily PNL data retrieved
content:
application/json:
schema: