forked from mvanhorn/printing-press-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec.json
More file actions
2902 lines (2902 loc) · 120 KB
/
Copy pathspec.json
File metadata and controls
2902 lines (2902 loc) · 120 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.1",
"info": {
"title": "Robinhood Crypto Trading API",
"version": "",
"x-logo": {
"url": "https://cdn.robinhood.com/app_assets/crypto/logos/inherited-dimensions_RH_logo.png",
"altText": "Robinhood Logo"
},
"description": "# Introduction\n\n\nWelcome to Robinhood Crypto Trading API documentation for traders and developers! The API lets you view crypto market data, access your account information, and place crypto orders programmatically.\n\nTo get started, head to your [crypto account settings](https://robinhood.com/account/crypto) on web classic to create credentials. There are two versions of the Crypto Trading API, giving you the option to place crypto orders with fee tiers (v2) or without fee tiers (v1). All read-only API actions are available on both versions. For more information about API version differences, fee tiers, and answers to common questions, visit our [Help Center](https://robinhood.com/us/en/support/articles/crypto-api). You can also view the [Fee Schedule](https://cdn.robinhood.com/assets/robinhood/legal/rhc-fee-schedule.pdf) for the latest rates.\n\nThe Robinhood Crypto Trading API is available to customers in the United States only. Use of the Robinhood Crypto Trading API is subject to the [Robinhood Crypto Customer Agreement](https://cdn.robinhood.com/assets/robinhood/legal/Robinhood%20Crypto%20Customer%20Agreement.pdf) as well as all other terms and disclosures made available on [Robinhood Crypto's about page](https://robinhood.com/us/en/about/crypto).\n\n\n# Authentication\n\nTo get started with the Robinhood Crypto Trading API, you need to create a key, signature, and headers. Authenticated requests must include all three `x-api-key`, `x-signature`, and `x-timestamp` HTTP headers.\n\n\n## Creating an API key\n\nHead to your [crypto account settings](https://robinhood.com/account/crypto) on web classic to create credentials. After creating credentials, you will receive the API key associated with the credential. You can modify, disable, and delete credentials you created at any time.\n\nYour API key will be used as the `x-api-key` header you will need to pass during authentication when calling our API endpoints. Additionally, you will need the public key generated in the [Creating a key pair](#section/Authentication/Creating-a-key-pair) section to create your API credentials.\n\n\n## Creating a key pair\n\n\n#### Below are example scripts on how to generate the public and private key pair. You'll need the public key for creating an API credential and the private key for authenticating requests. Remember to never share your private key with anyone. Robinhood will never ask you to share it with us.\n\nWe highly recommend saving your private and public keys in an encrypted format to ensure the highest level of security. Encrypting your keys will protect them from unauthorized access or theft. Avoid saving them in plain text or any easily accessible location. Instead, consider using strong encryption algorithms or tools specifically designed for key storage. Remember to choose a strong passphrase for encryption and store it separately from your keys. By taking these precautions, you can significantly reduce the risk of compromising your keys and safeguard your sensitive information.\n\n ### Python\n\nNote that you'll need to have `pynacl` installed to run the Python script. You can install them with the following pip command in your terminal.\n```console\npip install pynacl\n```\n\n```python\nimport nacl.signing\nimport base64\n\n# Generate an Ed25519 keypair\nprivate_key = nacl.signing.SigningKey.generate()\npublic_key = private_key.verify_key\n\n# Convert keys to base64 strings\nprivate_key_base64 = base64.b64encode(private_key.encode()).decode()\npublic_key_base64 = base64.b64encode(public_key.encode()).decode()\n\n# Print the keys in base64 format\nprint(\"Private Key (Base64):\")\nprint(private_key_base64)\n\nprint(\"Public Key (Base64):\")\nprint(public_key_base64)\n```\n\n\n## Headers and Signature\n\n<SecurityDefinitions />\n\n\n# Making your first API call\n\nDeveloping your own application to place trades with your Robinhood account is quick and simple. Once you've finished [authentication](https://docs.robinhood.com/crypto/trading/#section/Authentication), start here with the code you'll need to access the API and make supported API calls. These are essentially the building blocks of code for each API call, which you can easily build on based on your preferred strategies.\n\n1. Create a script file\n\n```console\nmkdir robinhood-api-trading && cd robinhood-api-trading\ntouch robinhood_api_trading.py\ntouch robinhood_api_trading_v2.py\n```\n\n2. Install PyNaCl library\n\n```console\npip install pynacl\n```\n\n3. To use v1 endpoints, copy the script below into the newly created `robinhood_api_trading.py` file. Make sure to add your API key and secret key into the `API_KEY` and `BASE64_PRIVATE_KEY` variables.\n\n```python\nimport base64\nimport datetime\nimport json\nfrom typing import Any, Dict, Optional\nimport uuid\nimport requests\nfrom nacl.signing import SigningKey\n\nAPI_KEY = \"ADD YOUR API KEY HERE\"\nBASE64_PRIVATE_KEY = \"ADD YOUR PRIVATE KEY HERE\"\n\nclass CryptoAPITrading:\n def __init__(self):\n self.api_key = API_KEY\n private_key_seed = base64.b64decode(BASE64_PRIVATE_KEY)\n self.private_key = SigningKey(private_key_seed)\n self.base_url = \"https://trading.robinhood.com\"\n\n @staticmethod\n def _get_current_timestamp() -> int:\n return int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp())\n\n @staticmethod\n def get_query_params(key: str, *args: Optional[str]) -> str:\n if not args:\n return \"\"\n\n params = []\n for arg in args:\n params.append(f\"{key}={arg}\")\n\n return \"?\" + \"&\".join(params)\n\n def make_api_request(self, method: str, path: str, body: str = \"\") -> Any:\n timestamp = self._get_current_timestamp()\n headers = self.get_authorization_header(method, path, body, timestamp)\n url = self.base_url + path\n\n try:\n response = {}\n if method == \"GET\":\n response = requests.get(url, headers=headers, timeout=10)\n elif method == \"POST\":\n response = requests.post(url, headers=headers, json=json.loads(body), timeout=10)\n return response.json()\n except requests.RequestException as e:\n print(f\"Error making API request: {e}\")\n return None\n\n def get_authorization_header(\n self, method: str, path: str, body: str, timestamp: int\n ) -> Dict[str, str]:\n message_to_sign = f\"{self.api_key}{timestamp}{path}{method}{body}\"\n signed = self.private_key.sign(message_to_sign.encode(\"utf-8\"))\n\n return {\n \"x-api-key\": self.api_key,\n \"x-signature\": base64.b64encode(signed.signature).decode(\"utf-8\"),\n \"x-timestamp\": str(timestamp),\n }\n\n def get_account(self) -> Any:\n path = \"/api/v1/crypto/trading/accounts/\"\n return self.make_api_request(\"GET\", path)\n\n # The symbols argument must be formatted in trading pairs, e.g \"BTC-USD\", \"ETH-USD\". If no symbols are provided,\n # all supported symbols will be returned\n def get_trading_pairs(self, *symbols: Optional[str]) -> Any:\n query_params = self.get_query_params(\"symbol\", *symbols)\n path = f\"/api/v1/crypto/trading/trading_pairs/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n # The asset_codes argument must be formatted as the short form name for a crypto, e.g \"BTC\", \"ETH\". If no asset\n # codes are provided, all crypto holdings will be returned\n def get_holdings(self, *asset_codes: Optional[str]) -> Any:\n query_params = self.get_query_params(\"asset_code\", *asset_codes)\n path = f\"/api/v1/crypto/trading/holdings/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n # The symbols argument must be formatted in trading pairs, e.g \"BTC-USD\", \"ETH-USD\". If no symbols are provided,\n # the best bid and ask for all supported symbols will be returned\n def get_best_bid_ask(self, *symbols: Optional[str]) -> Any:\n query_params = self.get_query_params(\"symbol\", *symbols)\n path = f\"/api/v1/crypto/marketdata/best_bid_ask/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n # The symbol argument must be formatted in a trading pair, e.g \"BTC-USD\", \"ETH-USD\"\n # The side argument must be \"bid\", \"ask\", or \"both\".\n # Multiple quantities can be specified in the quantity argument, e.g. \"0.1,1,1.999\".\n def get_estimated_price(self, symbol: str, side: str, quantity: str) -> Any:\n path = f\"/api/v1/crypto/marketdata/estimated_price/?symbol={symbol}&side={side}&quantity={quantity}\"\n return self.make_api_request(\"GET\", path)\n\n def place_order(\n self,\n client_order_id: str,\n side: str,\n order_type: str,\n symbol: str,\n order_config: Dict[str, str],\n ) -> Any:\n body = {\n \"client_order_id\": client_order_id,\n \"side\": side,\n \"type\": order_type,\n \"symbol\": symbol,\n f\"{order_type}_order_config\": order_config,\n }\n path = \"/api/v1/crypto/trading/orders/\"\n return self.make_api_request(\"POST\", path, json.dumps(body))\n\n def cancel_order(self, order_id: str) -> Any:\n path = f\"/api/v1/crypto/trading/orders/{order_id}/cancel/\"\n return self.make_api_request(\"POST\", path)\n\n def get_order(self, order_id: str) -> Any:\n path = f\"/api/v1/crypto/trading/orders/{order_id}/\"\n return self.make_api_request(\"GET\", path)\n\n def get_orders(self) -> Any:\n path = \"/api/v1/crypto/trading/orders/\"\n return self.make_api_request(\"GET\", path)\n\n\ndef main():\n api_trading_client = CryptoAPITrading()\n print(api_trading_client.get_account())\n\n \"\"\"\n BUILD YOUR TRADING STRATEGY HERE\n\n order = api_trading_client.place_order(\n str(uuid.uuid4()),\n \"buy\",\n \"market\",\n \"BTC-USD\",\n {\"asset_quantity\": \"0.0001\"}\n )\n \"\"\"\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n4. To use v2 endpoints, copy the script below into the newly created `robinhood_api_trading_v2.py` file. Make sure to add your API key and secret key into the `API_KEY` and `BASE64_PRIVATE_KEY` variables.\n\n```python\nimport base64\nimport datetime\nimport json\nfrom typing import Any, Dict, Optional\nimport uuid\nimport requests\nfrom nacl.signing import SigningKey\n\nAPI_KEY = \"ADD YOUR API KEY HERE\"\nBASE64_PRIVATE_KEY = \"ADD YOUR PRIVATE KEY HERE\"\n\n\nclass CryptoAPITradingV2:\n def __init__(self):\n self.api_key = API_KEY\n private_key_seed = base64.b64decode(BASE64_PRIVATE_KEY)\n self.private_key = SigningKey(private_key_seed)\n self.base_url = \"https://trading.robinhood.com\"\n\n @staticmethod\n def _get_current_timestamp() -> int:\n return int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp())\n\n @staticmethod\n def get_query_params(params_dict: Dict[str, Any]) -> str:\n \"\"\"\n Build query parameter string from a dictionary.\n - Single values: {\"key1\": \"value1\", \"key2\": \"value2\"}\n - Multiple values for same key: {\"symbol\": [\"BTC-USD\", \"ETH-USD\"]}\n \"\"\"\n if not params_dict:\n return \"\"\n \n params = []\n for key, value in params_dict.items():\n if value is None:\n continue\n if isinstance(value, list):\n # Handle multiple values for the same key\n for v in value:\n params.append(f\"{key}={v}\")\n else:\n params.append(f\"{key}={value}\")\n \n return \"?\" + \"&\".join(params) if params else \"\"\n\n def make_api_request(self, method: str, path: str, body: str = \"\") -> Any:\n timestamp = self._get_current_timestamp()\n headers = self.get_authorization_header(method, path, body, timestamp)\n url = self.base_url + path\n\n try:\n response = {}\n if method == \"GET\":\n response = requests.get(url, headers=headers, timeout=10)\n elif method == \"POST\":\n response = requests.post(url, headers=headers, json=json.loads(body) if body else None, timeout=10)\n\n # Check for non-success status codes\n if response.status_code >= 400:\n print(f\"HTTP Error {response.status_code}: {response.reason}\")\n try:\n return response.json()\n except json.JSONDecodeError:\n return {\"error\": response.text or response.reason, \"status_code\": response.status_code}\n\n return response.json()\n except requests.RequestException as e:\n print(f\"Error making API request: {e}\")\n return None\n\n def get_authorization_header(\n self, method: str, path: str, body: str, timestamp: int\n ) -> Dict[str, str]:\n message_to_sign = f\"{self.api_key}{timestamp}{path}{method}{body}\"\n signed = self.private_key.sign(message_to_sign.encode(\"utf-8\"))\n\n return {\n \"x-api-key\": self.api_key,\n \"x-signature\": base64.b64encode(signed.signature).decode(\"utf-8\"),\n \"x-timestamp\": str(timestamp),\n }\n\n def get_accounts(self) -> Any:\n path = \"/api/v2/crypto/trading/accounts/\"\n return self.make_api_request(\"GET\", path)\n\n # The symbols argument must be formatted in trading pairs, e.g \"BTC-USD\", \"ETH-USD\". If no symbols are provided,\n # all supported symbols will be returned\n def get_trading_pairs(self, *symbols: Optional[str]) -> list:\n params = {\"symbol\": list(symbols)} if symbols else {}\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/trading_pairs/{query_params}\"\n \n all_results = []\n response = self.make_api_request(\"GET\", path)\n \n while response:\n results = response.get(\"results\", [])\n all_results.extend(results)\n \n next_url = response.get(\"next\")\n if not next_url:\n break\n \n next_path = next_url.replace(self.base_url, \"\")\n response = self.make_api_request(\"GET\", next_path)\n \n return all_results\n\n # The asset_codes argument must be formatted as the short form name for a crypto, e.g \"BTC\", \"ETH\". If no asset\n # codes are provided, all crypto holdings will be returned\n def get_holdings(self, account_number: str, *asset_codes: Optional[str]) -> Any:\n params = {\"account_number\": account_number}\n if asset_codes:\n params[\"asset_code\"] = list(asset_codes)\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/holdings/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n # The symbols argument must be formatted in trading pairs, e.g \"BTC-USD\", \"ETH-USD\".\n def get_best_bid_ask(self, *symbols: str) -> Any:\n params = {\"symbol\": list(symbols)} if symbols else {}\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/marketdata/best_bid_ask/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n # The symbol argument must be formatted in a trading pair, e.g \"BTC-USD\", \"ETH-USD\"\n # The side argument must be \"bid\", \"ask\", or \"both\".\n # Multiple quantities can be specified in the quantity argument, e.g. \"0.1,1,1.999\".\n def get_estimated_price(self, symbol: str, side: str, quantity: str) -> Any:\n params = {\"symbol\": symbol, \"side\": side, \"quantity\": quantity}\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/estimated_price/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n def place_order(\n self,\n account_number: str,\n client_order_id: str,\n side: str,\n order_type: str,\n symbol: str,\n order_config: Dict[str, str],\n ) -> Any:\n body = {\n \"client_order_id\": client_order_id,\n \"side\": side,\n \"type\": order_type,\n \"symbol\": symbol,\n f\"{order_type}_order_config\": order_config,\n }\n params = {\"account_number\": account_number}\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/orders/{query_params}\"\n return self.make_api_request(\"POST\", path, json.dumps(body))\n\n def cancel_order(self, order_id: str) -> Any:\n path = f\"/api/v2/crypto/trading/orders/{order_id}/cancel/\"\n return self.make_api_request(\"POST\", path)\n\n def get_order(self, account_number: str, order_id: str) -> Any:\n params = {\"account_number\": account_number}\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/orders/{order_id}/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n def get_orders(self, account_number: str) -> Any:\n params = {\n \"account_number\": account_number,\n \"created_at_start\": \"2023-01-01T20:57:50Z\"\n }\n query_params = self.get_query_params(params)\n path = f\"/api/v2/crypto/trading/orders/{query_params}\"\n return self.make_api_request(\"GET\", path)\n\n\ndef main():\n api_trading_client = CryptoAPITradingV2()\n print(api_trading_client.get_trading_pairs())\n # print(api_trading_client.get_trading_pairs(\"BTC-USD\", \"ETH-USD\"))\n # print(api_trading_client.get_best_bid_ask(\"BTC-USD\")) #\"BTC-USD\", \"ETH-USD\"\n # print(api_trading_client.get_estimated_price(symbol=\"BTC-USD\", side=\"both\", quantity=\"0.01\"))\n\n # accounts = api_trading_client.get_accounts()\n # print(accounts)\n # account_number = accounts[\"results\"][0][\"account_number\"]\n # print(f\"account_number: {account_number}\")\n # print(api_trading_client.get_orders(account_number))\n # print(api_trading_client.get_holdings(account_number))\n # print(api_trading_client.get_holdings(account_number, \"BTC\", \"ETH\"))\n\n \"\"\"\n BUILD YOUR TRADING STRATEGY HERE\n\n order = api_trading_client.place_order(\n account_number,\n str(uuid.uuid4()),\n \"buy\",\n \"market\",\n \"BTC-USD\",\n {\"asset_quantity\": \"0.000001\"}\n )\n \"\"\"\n\n\nif __name__ == \"__main__\":\n main()\n```\n\n5. Run your script from the command line\n\n```console\n# to run the Python script using the v1 API endpoints:\npython robinhood_api_trading.py\n# to run the Python script using the v2 API endpoints:\npython robinhood_api_trading_v2.py\n```\n\n\n# Pagination\n\n\n Endpoints that return a list of results allow you to paginate to have more control over how many and which results to display.\n\n\n### Pagination Parameters\n\n| Parameter | Description |\n|-|-|\n| cursor | The cursor is a unique identifier for each page in a list of results. The cursor is used to paginate through the pages of results. |\n| limit | The limit is the number of items to return in a single page. Some of our endpoints support this query parameter. You can view support by checking the query parameters in the documentation of each endpoint. |\n\n\n### Pagination Response\n\n\n| Field | Description |\n|-|-|\n| next | The API request endpoint that includes the next cursor query parameter to use for pagination. |\n| previous | The API request endpoint that includes the previous cursor query parameter to use for pagination. |\n| results | The list of response items for the current cursor.\n\n\n# Rate Limiting\n\n\n### Rate Limits\n* Requests per minute per user account: 100\n* Requests per minute per user account in bursts: 300\n\n\nRate limiting is applied using a token bucket implementation. The burst size or `capacity` is the number of tokens you can use to call an endpoint. This capacity is initialized at the maximum capacity and will be refilled using a `refill amount` at a timed interval called `refill interval` until the max capacity is once again reached.\n\n\n### Rate Limiting Terms\n\n\n| Term | Description |\n|-|-|\n| Max capacity | The maximum amount of tokens allowed. Will no longer continue refilling if this amount is reached. |\n| Remaining amount | The number of tokens remaining that can be consumed to call an endpoint. |\n| Refill amount | The number of tokens that are refilled at each refill interval. |\n| Refill interval | The timed interval at which the tokens are refilled.\n\n The actual values of the configuration will fluctuate depending on the availability of our service and our current expected volume at the time of service. Rate limits are applied per endpoint and may differ among each endpoint depending on their expected use case.\n\n\n #### Example rate limiting configuration:\n\n\n| Term | Value |\n|-|-|\n| Max capacity | 5 |\n| Remaining amount | 2 |\n| Refill amount | 1 |\n| Refill interval | 1 second |\n\n\n| Action | Time (in seconds) | Remaining amount | Description |\n|-|-|-|-|\n| Initialize | 0 | 5 | Initial state of the token bucket. |\n| Endpoint call 1 | 0.5 | 4 | One token consumed for calling endpoint 1. |\n| Endpoint call 2 | 0.7 | 3 | One token consumed for calling endpoint 2. |\n| Refill | 1 | 4 | One token refilled at refill interval. |\n| Refill | 2 | 5 | One token refilled at refill interval. |\n| No refill | 3 | 5 | No refill since max capacity has been reached and no endpoints were called. |\n| Endpoint call 3 | 3.5 | 4 | One token consumed for calling endpoint 3.\n\n\n# Error Responses\n\n\n### Error response format\n\n#### Type\n The `type` field in the error response will be mapped to the following:\n | Error type | Status codes |\n|-|-|\n| validation_error | 400 |\n| client_error | 4XX, excluding 400 |\n| server_error | 5XX |\n\n\n#### Errors\nThe `errors` field will contain a list of error details, each item will contain a nested `attr` and `detail` field.\n| Field | Description |\n|-|-|\n| attr | Error types of `validation_error` will specify the field name or `non_field_errors` if the error cannot be attributed to a field. Will be `null` for error types of either `client_error` and `server_error`. |\n| detail | Will contain a human readable string describing the error. |\n\n\n\n### Example Error Response\nHere's a sample error response where the `client_order_id` field in the payload was a value that was not expected when calling the ***Add Crypto Order*** endpoint. The `detail` field for each error in the `errors` list will help understand why the `validation_error` was thrown. The `attr` field will indicate which field name in the request body or query parameter the error was thrown for if applicable.\n```javascript\n{\n \"type\": \"validation_error\"\n \"errors\": [\n {\n \"detail\": \"Must be a valid UUID.\",\n \"attr\": \"client_order_id\"\n }\n ]\n}\n```\n\n\n### Common Error Status Codes\n | Status Code | Error |\n|-|-|\n| 400 | Bad request |\n| 401 | Unauthorized |\n| 403 | Forbidden |\n| 404 | Not found |\n| 405 | Method not allowed |\n| 406 | Not acceptable |\n| 415 | Unsupported media type |\n| 429 | Too many requests |\n| 500 | Internal server error |\n| 503 | Service unavailable |"
},
"servers": [
{
"url": "https://trading.robinhood.com/"
}
],
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"paths": {
"/api/v1/crypto/trading/accounts/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Account"
],
"summary": "Get Crypto Trading Account Details",
"description": "Fetches the Robinhood Crypto account details for the current user.",
"operationId": "api_v1_crypto_trading_account_Details",
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/api/v1/crypto/trading/accounts/\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8'\n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
},
"/api/v1/crypto/trading/trading_pairs/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Trading"
],
"summary": "Get Crypto Trading Pairs",
"description": "Fetch a list of trading pairs.",
"operationId": "api_v1_crypto_trading_trading_pairs",
"parameters": [
{
"name": "symbol",
"description": "List of trading pair symbol(s) to retrieve data for.\n\nMultiple symbols can be provided by using the \"symbol\" parameter with different values. Ensure that the symbol(s) are provided in all uppercase.\n\nFor example, **?symbol=BTC-USD&symbol=ETH-USD**",
"example": "BTC-USD",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"description": "Limit the number of results per page size",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "cursor",
"in": "query",
"schema": {
"type": "string"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/api/v1/crypto/trading/trading_pairs/?symbol=BTC-USD\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8'\n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"required": [
"results"
],
"type": "object",
"properties": {
"next": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/trading_pairs/?cursor={CURSOR_ID}"
},
"previous": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/trading_pairs/?cursor={CURSOR_ID}"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TradingPair"
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
}
},
"/api/v1/crypto/trading/holdings/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Trading"
],
"summary": "Get Crypto Holdings",
"description": "Fetch a list of holdings for the current user.",
"operationId": "api_v1_crypto_trading_holdings",
"parameters": [
{
"name": "asset_code",
"description": "The asset code(s) to retrieve data for.\n\nMultiple asset codes can be provided by using the \"asset_code\" parameter with different values. Ensure that the asset codes are provided in all uppercase.\n\nFor example, **?asset_code=BTC&asset_code=ETH**",
"example": "BTC",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"description": "Limit the number of results per page size",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/api/v1/crypto/trading/holdings/?asset_code=BTC\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8'\n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"required": [
"results"
],
"type": "object",
"properties": {
"next": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/holdings?cursor={CURSOR_ID}"
},
"previous": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/holdings?cursor={CURSOR_ID}"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Holdings"
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
}
},
"/api/v1/crypto/trading/orders/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Trading"
],
"summary": "Get Crypto Orders",
"description": "Fetch a list of orders for the current user.",
"operationId": "api_v1_crypto_trading_orders",
"parameters": [
{
"name": "created_at_start",
"description": "Filter by created at start time range (greater than or equal to) in ISO 8601 format",
"example": "2023-10-31T20:57:50Z",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "created_at_end",
"description": "Filter by created at end time range (less than or equal to) in ISO 8601 format",
"example": "2023-10-31T20:57:50Z",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "symbol",
"description": "Currency pair symbol. Ensure that the symbol is provided in all uppercase.",
"example": "BTC-USD",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "id",
"description": "Order ID, unique per order",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "side",
"description": "Buy or sell",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"buy",
"sell"
]
}
},
{
"name": "state",
"description": "State of the order",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"open",
"canceled",
"partially_filled",
"filled",
"failed"
]
}
},
{
"name": "type",
"description": "Type of order",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"limit",
"market",
"stop_limit",
"stop_loss"
]
}
},
{
"name": "updated_at_start",
"description": "Filter by updated at start time range (greater than or equal to) in ISO 8601 format",
"example": "2023-10-31T20:57:50Z",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "updated_at_end",
"description": "Filter by updated at end time range (less than or equal to) in ISO 8601 format",
"example": "2023-10-31T20:57:50Z",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"description": "Limit the number of results per page size",
"in": "query",
"required": false,
"schema": {
"type": "integer"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/api/v1/crypto/trading/orders/\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8'\n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"required": [
"results"
],
"type": "object",
"properties": {
"next": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/orders/?cursor={CURSOR_ID}"
},
"previous": {
"type": "string",
"format": "uri",
"nullable": true,
"example": "https://trading.robinhood.com/api/v1/crypto/trading/orders/?cursor={CURSOR_ID}"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrderResponse"
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
},
"post": {
"tags": [
"Trading"
],
"summary": "Place New Crypto Order",
"description": "Places a new crypto trading order with an order type. \n\n **Note**: Depending on the type used in the request body, you must include the respective order configuration in the request body.\n\nFor order configurations that support both `asset_quantity` or `quote_amount`, only one can be present in the request body.",
"operationId": "api_v1_post_crypto_trading_order",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddOrder"
}
}
}
},
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"POST\" \"https://trading.robinhood.com/api/v1/crypto/trading/orders/\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8' \\\n --data-raw '{\"client_order_id\":\"131de903-5a9c-4260-abc1-28d562a5dcf0\",\"side\":\"buy\",\"type\":\"market\",\"symbol\":\"BTC-USD\",\"market_order_config\":{\"asset_quantity\":\"0.1\"}}' \n"
}
],
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrderResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/v1/crypto/trading/orders/{id}/cancel/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"post": {
"tags": [
"Trading"
],
"summary": "Cancel Open Crypto Order",
"description": "Cancels an open crypto trading order.",
"operationId": "api_v1_post_crypto_trading_cancel_order",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Order ID, unique per order",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"POST\" \"https://trading.robinhood.com/api/v1/crypto/trading/orders/{id}/cancel/\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8' \n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"text/plain": {
"schema": {
"type": "string",
"description": "Success string with order id"
},
"example": "Cancel request was submitted for order {id}"
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
}
},
"/api/v1/crypto/marketdata/best_bid_ask/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Market Data"
],
"summary": "Get Best Price",
"description": "Fetch a single bid and ask price per symbol, representing the best available price across our partner market makers. This price does not take into account the order size, and may not be the final execution price.\n\nThe bid and ask prices include a spread. The buy spread is the percent difference between the ask and the mid price. The sell spread is the percent difference between the bid and the mid price.\n\nNote that in the v2 endpoint, **Place crypto orders with fee tiers**, partner exchanges provide prices instead of market makers, with orders routed accordingly. For more information on routing, visit our [<u>Help Center</u>](https://robinhood.com/us/en/support/articles/crypto-order-routing/).",
"operationId": "api_v1_crypto_marketdata_best_bid_ask",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "List of trading pair symbol(s) to retrieve data for.\n\nMultiple symbols can be provided by using the \"symbol\" parameter with different values. Ensure that the symbol(s) are provided in all uppercase.\n\nFor example, **?symbol=BTC-USD&symbol=ETH-USD**",
"example": "BTC-USD",
"schema": {
"type": "string"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/api/v1/crypto/marketdata/best_bid_ask/?symbol=BTC-USD\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8' \n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BidAskPrice"
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/v1/crypto/marketdata/estimated_price/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"Market Data"
],
"summary": "Get Estimated Price",
"description": "This endpoint returns the estimated total cost or credit for a particular symbol, book side, and asset quantity. You can include a list of quantities in a single request to retrieve the price for various hypothetical order sizes. \n\nThe estimated price represents the expected execution price if you were to subsequently place an order. To estimate the cost for a Buy order, request an Ask quote. If you are preparing to place a Sell order, request a Bid quote. The execution price may vary due to market volatility and once executed the transaction may not be undone.\n\nThe bid and ask prices are the best prices our market makers provide for an order, inclusive of a spread. The buy spread is the percent difference between the ask and the mid price. The sell spread is the percent difference between the bid and the mid price.",
"operationId": "api_v1_crypto_marketdata_estimated_price",
"parameters": [
{
"name": "symbol",
"in": "query",
"description": "A string matching a valid currency pair, for example BTC-USD. Ensure that the symbol is provided in all uppercase.\n\nOnly USD symbols are accepted.",
"example": "BTC-USD",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "side",
"in": "query",
"description": "Order side. e.g. bid, ask, or both.",
"example": "bid",
"required": true,
"schema": {
"type": "string",
"enum": [
"bid",
"ask",
"both"
]
}
},
{
"name": "quantity",
"in": "query",
"description": "Quantity must be between `min_order_size` and `max_order_size` as defined in our `Get Crypto Trading Pairs` endpoint.\n\n A max of 10 quantities can be specified for each request.",
"example": "0.1,1,1.999",
"required": true,
"schema": {
"type": "string"
}
}
],
"x-codeSamples": [
{
"lang": "cURL",
"source": "curl -X \"GET\" \"https://trading.robinhood.com/marketdata/api/v1/estimated_price/?symbol=BTC-USD&side=ask&quantity=0.1,1,1.999\" \\\n -H 'x-api-key: <YOUR-API-KEY>' \\\n -H 'x-timestamp: <timestamp unix>' \\\n -H 'x-signature: <YOUR-MSG-SIGNATURE>' \\\n -H 'Content-Type: application/json; charset=utf-8' \n"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EstimatedPrice"
}
}
}
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/v2/crypto/trading/accounts/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"V2 Account"
],
"summary": "Get Accounts",
"description": "Retrieve a paginated list of crypto trading accounts for the authenticated user. Returns account details including buying power, status, and fee tier information.",
"operationId": "api_v2_crypto_trading_accounts",
"parameters": [
{
"name": "cursor",
"description": "Optional cursor for pagination. Use the value from `next` or `previous` in the response to navigate through pages.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"description": "Optional page size limit. Specifies the number of accounts to return per page. Maximum value is determined by system configuration.",
"in": "query",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2AccountsResponse"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
}
},
"/api/v2/crypto/trading/trading_pairs/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],
"get": {
"tags": [
"V2 Trading"
],
"summary": "Get Trading Pairs",
"description": "Fetch a paginated list of available trading pairs for crypto trading. Returns trading pair details including price increments, order size limits, and tradability status. Trading pairs can be filtered by symbol.",
"operationId": "api_v2_crypto_trading_trading_pairs",
"parameters": [
{
"name": "symbol",
"description": "Optional. Filter by trading pair symbol(s). Example: `symbol=BTC-USD`. Multiple symbols can be provided by using the \"symbol\" parameter with different values. Ensure that the symbol(s) are provided in all uppercase.\n\nFor example, `?symbol=BTC-USD&symbol=ETH-USD`.\n\nIf the \"symbol\" parameter is not provided, this endpoint will return all tradable currency pairs.",
"example": "BTC-USD",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "cursor",
"description": "Optional cursor for pagination. Use the value from `next` or `previous` in the response to navigate through pages.",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"description": "Optional page size limit. Specifies the number of results to return per page. Maximum value is determined by system configuration.",
"in": "query",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2TradingPairsResponse"
}
}
}
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"type": "client_error",
"errors": [
{
"detail": "string",
"attr": null
}
]
}
}
}
}
}
}
},
"/api/v2/crypto/trading/holdings/": {
"security": [
{
"API Key": [],
"API Signature": [],
"Timestamp": []
}
],