-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
4744 lines (4530 loc) · 258 KB
/
index.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<meta
name="description"
content="XFT Developer Documentation"
>
<title>XFT Documentation</title>
<style media="screen">
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight .gh {
color: #999999;
}
.highlight .sr {
color: #f6aa11;
}
.highlight .go {
color: #888888;
}
.highlight .gp {
color: #555555;
}
.highlight .gs {
}
.highlight .gu {
color: #aaaaaa;
}
.highlight .nb {
color: #f6aa11;
}
.highlight .cm {
color: #75715e;
}
.highlight .cp {
color: #75715e;
}
.highlight .c1 {
color: #75715e;
}
.highlight .cs {
color: #75715e;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf {
color: #75715e;
}
.highlight .err {
color: #960050;
}
.highlight .gr {
color: #960050;
}
.highlight .gt {
color: #960050;
}
.highlight .gd {
color: #49483e;
}
.highlight .gi {
color: #49483e;
}
.highlight .ge {
color: #49483e;
}
.highlight .kc {
color: #66d9ef;
}
.highlight .kd {
color: #66d9ef;
}
.highlight .kr {
color: #66d9ef;
}
.highlight .no {
color: #66d9ef;
}
.highlight .kt {
color: #66d9ef;
}
.highlight .mf {
color: #ae81ff;
}
.highlight .mh {
color: #ae81ff;
}
.highlight .il {
color: #ae81ff;
}
.highlight .mi {
color: #ae81ff;
}
.highlight .mo {
color: #ae81ff;
}
.highlight .m, .highlight .mb, .highlight .mx {
color: #ae81ff;
}
.highlight .sc {
color: #ae81ff;
}
.highlight .se {
color: #ae81ff;
}
.highlight .ss {
color: #ae81ff;
}
.highlight .sd {
color: #e6db74;
}
.highlight .s2 {
color: #e6db74;
}
.highlight .sb {
color: #e6db74;
}
.highlight .sh {
color: #e6db74;
}
.highlight .si {
color: #e6db74;
}
.highlight .sx {
color: #e6db74;
}
.highlight .s1 {
color: #e6db74;
}
.highlight .s, .highlight .sa, .highlight .dl {
color: #e6db74;
}
.highlight .na {
color: #a6e22e;
}
.highlight .nc {
color: #a6e22e;
}
.highlight .nd {
color: #a6e22e;
}
.highlight .ne {
color: #a6e22e;
}
.highlight .nf, .highlight .fm {
color: #a6e22e;
}
.highlight .vc {
color: #ffffff;
}
.highlight .nn {
color: #ffffff;
}
.highlight .ni {
color: #ffffff;
}
.highlight .bp {
color: #ffffff;
}
.highlight .vg {
color: #ffffff;
}
.highlight .vi {
color: #ffffff;
}
.highlight .nv, .highlight .vm {
color: #ffffff;
}
.highlight .w {
color: #ffffff;
}
.highlight {
color: #ffffff;
}
.highlight .n, .highlight .py, .highlight .nx {
color: #ffffff;
}
.highlight .nl {
color: #f92672;
}
.highlight .ow {
color: #f92672;
}
.highlight .nt {
color: #f92672;
}
.highlight .k, .highlight .kv {
color: #f92672;
}
.highlight .kn {
color: #f92672;
}
.highlight .kp {
color: #f92672;
}
.highlight .o {
color: #f92672;
}
</style>
<style media="print">
* {
-webkit-transition:none!important;
transition:none!important;
}
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight, .highlight .w {
color: #586e75;
}
.highlight .err {
color: #002b36;
background-color: #dc322f;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs {
color: #657b83;
}
.highlight .cp {
color: #b58900;
}
.highlight .nt {
color: #b58900;
}
.highlight .o, .highlight .ow {
color: #93a1a1;
}
.highlight .p, .highlight .pi {
color: #93a1a1;
}
.highlight .gi {
color: #859900;
}
.highlight .gd {
color: #dc322f;
}
.highlight .gh {
color: #268bd2;
background-color: #002b36;
font-weight: bold;
}
.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
color: #6c71c4;
}
.highlight .kc {
color: #cb4b16;
}
.highlight .kt {
color: #cb4b16;
}
.highlight .kd {
color: #cb4b16;
}
.highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
color: #859900;
}
.highlight .sa {
color: #6c71c4;
}
.highlight .sr {
color: #2aa198;
}
.highlight .si {
color: #d33682;
}
.highlight .se {
color: #d33682;
}
.highlight .nn {
color: #b58900;
}
.highlight .nc {
color: #b58900;
}
.highlight .no {
color: #b58900;
}
.highlight .na {
color: #268bd2;
}
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
color: #859900;
}
.highlight .ss {
color: #859900;
}
</style>
<link href="stylesheets/screen-b9f31836.css" rel="stylesheet" media="screen" />
<link href="stylesheets/print-953e3353.css" rel="stylesheet" media="print" />
<script src="javascripts/all-40d46d00.js"></script>
<script>
$(function() { setupCodeCopy(); });
</script>
</head>
<body class="index" data-languages="["python","typescript"]">
<a href="#" id="nav-button">
<span>
NAV
<img src="images/navbar-cad8cdcb.png" alt="" />
</span>
</a>
<div class="toc-wrapper">
<img src="images/logo-c83b49d0.png" class="logo" alt="" />
<div class="lang-selector">
<a href="#" data-language-name="python">python</a>
<a href="#" data-language-name="typescript">typescript</a>
</div>
<div class="search">
<input type="text" class="search" id="input-search" placeholder="Search">
</div>
<ul class="search-results"></ul>
<ul id="toc" class="toc-list-h1">
<li>
<a href="#introduction" class="toc-h1 toc-link" data-title="Introduction">Introduction</a>
</li>
<li>
<a href="#clob-api" class="toc-h1 toc-link" data-title="CLOB API">CLOB API</a>
<ul class="toc-list-h2">
<li>
<a href="#introduction-2" class="toc-h2 toc-link" data-title="Introduction">Introduction</a>
<ul class="toc-list-h3">
<li>
<a href="#system" class="toc-h3 toc-link" data-title="System">System</a>
</li>
<li>
<a href="#api" class="toc-h3 toc-link" data-title="API">API</a>
</li>
<li>
<a href="#security" class="toc-h3 toc-link" data-title="Security">Security</a>
</li>
<li>
<a href="#fees" class="toc-h3 toc-link" data-title="Fees">Fees</a>
</li>
<li>
<a href="#additional-resources" class="toc-h3 toc-link" data-title="Additional Resources">Additional Resources</a>
</li>
</ul>
</li>
<li>
<a href="#deployments" class="toc-h2 toc-link" data-title="Deployments">Deployments</a>
</li>
<li>
<a href="#status" class="toc-h2 toc-link" data-title="Status">Status</a>
</li>
<li>
<a href="#clients" class="toc-h2 toc-link" data-title="Clients">Clients</a>
<ul class="toc-list-h3">
<li>
<a href="#order-utils" class="toc-h3 toc-link" data-title="Order Utils">Order Utils</a>
</li>
</ul>
</li>
<li>
<a href="#endpoints" class="toc-h2 toc-link" data-title="Endpoints">Endpoints</a>
<ul class="toc-list-h3">
<li>
<a href="#rest" class="toc-h3 toc-link" data-title="REST">REST</a>
</li>
<li>
<a href="#websocket" class="toc-h3 toc-link" data-title="Websocket">Websocket</a>
</li>
</ul>
</li>
<li>
<a href="#authentication" class="toc-h2 toc-link" data-title="Authentication">Authentication</a>
<ul class="toc-list-h3">
<li>
<a href="#l1-private-key-authentication" class="toc-h3 toc-link" data-title="L1: Private Key Authentication">L1: Private Key Authentication</a>
</li>
<li>
<a href="#l2-api-key-authentication" class="toc-h3 toc-link" data-title="L2: API Key Authentication">L2: API Key Authentication</a>
</li>
<li>
<a href="#create-api-key" class="toc-h3 toc-link" data-title="Create API Key">Create API Key</a>
</li>
<li>
<a href="#derive-api-key" class="toc-h3 toc-link" data-title="Derive API Key">Derive API Key</a>
</li>
<li>
<a href="#get-api-keys" class="toc-h3 toc-link" data-title="Get API Keys">Get API Keys</a>
</li>
<li>
<a href="#delete-api-key" class="toc-h3 toc-link" data-title="Delete API Key">Delete API Key</a>
</li>
</ul>
</li>
<li>
<a href="#orders" class="toc-h2 toc-link" data-title="Orders">Orders</a>
<ul class="toc-list-h3">
<li>
<a href="#overview-2" class="toc-h3 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#allowances" class="toc-h3 toc-link" data-title="Allowances">Allowances</a>
</li>
<li>
<a href="#signature-types" class="toc-h3 toc-link" data-title="Signature Types">Signature Types</a>
</li>
<li>
<a href="#validity-checks" class="toc-h3 toc-link" data-title="Validity Checks">Validity Checks</a>
</li>
<li>
<a href="#create-and-place-an-order" class="toc-h3 toc-link" data-title="Create and Place an Order">Create and Place an Order</a>
</li>
<li>
<a href="#get-order" class="toc-h3 toc-link" data-title="Get Order">Get Order</a>
</li>
<li>
<a href="#check-if-an-order-is-scoring" class="toc-h3 toc-link" data-title="Check if an order is scoring">Check if an order is scoring</a>
</li>
<li>
<a href="#check-if-some-orders-are-scoring" class="toc-h3 toc-link" data-title="Check if some orders are scoring">Check if some orders are scoring</a>
</li>
<li>
<a href="#get-active-orders" class="toc-h3 toc-link" data-title="Get Active Orders">Get Active Orders</a>
</li>
<li>
<a href="#cancel-an-order" class="toc-h3 toc-link" data-title="Cancel an Order">Cancel an Order</a>
</li>
<li>
<a href="#cancel-orders" class="toc-h3 toc-link" data-title="Cancel orders">Cancel orders</a>
</li>
<li>
<a href="#cancel-all-orders" class="toc-h3 toc-link" data-title="Cancel All Orders">Cancel All Orders</a>
</li>
<li>
<a href="#cancel-orders-from-market" class="toc-h3 toc-link" data-title="Cancel orders from market">Cancel orders from market</a>
</li>
</ul>
</li>
<li>
<a href="#trades" class="toc-h2 toc-link" data-title="Trades">Trades</a>
<ul class="toc-list-h3">
<li>
<a href="#overview-3" class="toc-h3 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#statuses" class="toc-h3 toc-link" data-title="Statuses">Statuses</a>
</li>
<li>
<a href="#get-trades" class="toc-h3 toc-link" data-title="Get Trades">Get Trades</a>
</li>
</ul>
</li>
<li>
<a href="#markets" class="toc-h2 toc-link" data-title="Markets">Markets</a>
<ul class="toc-list-h3">
<li>
<a href="#get-markets" class="toc-h3 toc-link" data-title="Get Markets">Get Markets</a>
</li>
<li>
<a href="#get-sampling-markets" class="toc-h3 toc-link" data-title="Get Sampling Markets">Get Sampling Markets</a>
</li>
<li>
<a href="#get-simplified-markets" class="toc-h3 toc-link" data-title="Get Simplified Markets">Get Simplified Markets</a>
</li>
<li>
<a href="#get-sampling-simplified-markets" class="toc-h3 toc-link" data-title="Get Sampling Simplified Markets">Get Sampling Simplified Markets</a>
</li>
<li>
<a href="#get-market" class="toc-h3 toc-link" data-title="Get Market">Get Market</a>
</li>
</ul>
</li>
<li>
<a href="#prices-and-books" class="toc-h2 toc-link" data-title="Prices and Books">Prices and Books</a>
<ul class="toc-list-h3">
<li>
<a href="#get-book" class="toc-h3 toc-link" data-title="Get Book">Get Book</a>
</li>
<li>
<a href="#get-books" class="toc-h3 toc-link" data-title="Get Books">Get Books</a>
</li>
<li>
<a href="#get-price" class="toc-h3 toc-link" data-title="Get Price">Get Price</a>
</li>
<li>
<a href="#get-prices" class="toc-h3 toc-link" data-title="Get Prices">Get Prices</a>
</li>
<li>
<a href="#get-midpoint" class="toc-h3 toc-link" data-title="Get Midpoint">Get Midpoint</a>
</li>
<li>
<a href="#get-midpoints" class="toc-h3 toc-link" data-title="Get Midpoints">Get Midpoints</a>
</li>
<li>
<a href="#get-spread" class="toc-h3 toc-link" data-title="Get spread">Get spread</a>
</li>
<li>
<a href="#get-spreads" class="toc-h3 toc-link" data-title="Get spreads">Get spreads</a>
</li>
</ul>
</li>
<li>
<a href="#websocket-api" class="toc-h2 toc-link" data-title="Websocket API">Websocket API</a>
<ul class="toc-list-h3">
<li>
<a href="#overview-4" class="toc-h3 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#subscription" class="toc-h3 toc-link" data-title="Subscription">Subscription</a>
</li>
<li>
<a href="#wss-authentication" class="toc-h3 toc-link" data-title="WSS Authentication">WSS Authentication</a>
</li>
<li>
<a href="#user-channel" class="toc-h3 toc-link" data-title="User Channel">User Channel</a>
</li>
<li>
<a href="#market-channel" class="toc-h3 toc-link" data-title="Market Channel">Market Channel</a>
</li>
</ul>
</li>
<li>
<a href="#timeseries-data" class="toc-h2 toc-link" data-title="Timeseries Data">Timeseries Data</a>
<ul class="toc-list-h3">
<li>
<a href="#http-request-28" class="toc-h3 toc-link" data-title="HTTP Request">HTTP Request</a>
</li>
<li>
<a href="#query-parameters" class="toc-h3 toc-link" data-title="Query Parameters">Query Parameters</a>
</li>
<li>
<a href="#example-response-format" class="toc-h3 toc-link" data-title="Example Response Format">Example Response Format</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#gamma-markets-api" class="toc-h1 toc-link" data-title="Gamma Markets API">Gamma Markets API</a>
<ul class="toc-list-h2">
<li>
<a href="#overview-5" class="toc-h2 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#endpoint" class="toc-h2 toc-link" data-title="Endpoint">Endpoint</a>
</li>
<li>
<a href="#market-organization" class="toc-h2 toc-link" data-title="Market Organization">Market Organization</a>
<ul class="toc-list-h3">
<li>
<a href="#detail" class="toc-h3 toc-link" data-title="Detail">Detail</a>
</li>
<li>
<a href="#example" class="toc-h3 toc-link" data-title="Example">Example</a>
</li>
</ul>
</li>
<li>
<a href="#markets-2" class="toc-h2 toc-link" data-title="Markets">Markets</a>
<ul class="toc-list-h3">
<li>
<a href="#http-request-29" class="toc-h3 toc-link" data-title="HTTP Request">HTTP Request</a>
</li>
<li>
<a href="#query-parameters-2" class="toc-h3 toc-link" data-title="Query Parameters">Query Parameters</a>
</li>
<li>
<a href="#example-queries" class="toc-h3 toc-link" data-title="Example Queries">Example Queries</a>
</li>
<li>
<a href="#example-response-format-2" class="toc-h3 toc-link" data-title="Example Response Format">Example Response Format</a>
</li>
</ul>
</li>
<li>
<a href="#single-market" class="toc-h2 toc-link" data-title="Single Market">Single Market</a>
<ul class="toc-list-h3">
<li>
<a href="#http-request-30" class="toc-h3 toc-link" data-title="HTTP Request">HTTP Request</a>
</li>
<li>
<a href="#example-query" class="toc-h3 toc-link" data-title="Example Query">Example Query</a>
</li>
</ul>
</li>
<li>
<a href="#events" class="toc-h2 toc-link" data-title="Events">Events</a>
<ul class="toc-list-h3">
<li>
<a href="#http-request-31" class="toc-h3 toc-link" data-title="HTTP Request">HTTP Request</a>
</li>
<li>
<a href="#query-parameters-3" class="toc-h3 toc-link" data-title="Query Parameters">Query Parameters</a>
</li>
<li>
<a href="#example-queries-2" class="toc-h3 toc-link" data-title="Example Queries">Example Queries</a>
</li>
<li>
<a href="#example-response-format-3" class="toc-h3 toc-link" data-title="Example Response Format">Example Response Format</a>
</li>
</ul>
</li>
<li>
<a href="#single-event" class="toc-h2 toc-link" data-title="Single Event">Single Event</a>
<ul class="toc-list-h3">
<li>
<a href="#http-request-32" class="toc-h3 toc-link" data-title="HTTP Request">HTTP Request</a>
</li>
<li>
<a href="#example-query-2" class="toc-h3 toc-link" data-title="Example Query">Example Query</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#subgraph" class="toc-h1 toc-link" data-title="Subgraph">Subgraph</a>
<ul class="toc-list-h2">
<li>
<a href="#overview-6" class="toc-h2 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#source" class="toc-h2 toc-link" data-title="Source">Source</a>
</li>
<li>
<a href="#hosted-version" class="toc-h2 toc-link" data-title="Hosted Version">Hosted Version</a>
</li>
</ul>
</li>
<li>
<a href="#resolution" class="toc-h1 toc-link" data-title="Resolution">Resolution</a>
<ul class="toc-list-h2">
<li>
<a href="#uma" class="toc-h2 toc-link" data-title="UMA">UMA</a>
<ul class="toc-list-h3">
<li>
<a href="#overview-7" class="toc-h3 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#resolution-process" class="toc-h3 toc-link" data-title="Resolution Process">Resolution Process</a>
</li>
<li>
<a href="#deployed-addresses" class="toc-h3 toc-link" data-title="Deployed Addresses">Deployed Addresses</a>
</li>
<li>
<a href="#additional-resources-2" class="toc-h3 toc-link" data-title="Additional Resources">Additional Resources</a>
</li>
</ul>
</li>
<li>
<a href="#pyth" class="toc-h2 toc-link" data-title="Pyth">Pyth</a>
</li>
</ul>
</li>
<li>
<a href="#rewards" class="toc-h1 toc-link" data-title="Rewards">Rewards</a>
<ul class="toc-list-h2">
<li>
<a href="#liquidity-rewards-program" class="toc-h2 toc-link" data-title="Liquidity Rewards Program">Liquidity Rewards Program</a>
<ul class="toc-list-h3">
<li>
<a href="#overview-8" class="toc-h3 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#methodology" class="toc-h3 toc-link" data-title="Methodology">Methodology</a>
</li>
<li>
<a href="#market-configurations" class="toc-h3 toc-link" data-title="Market Configurations">Market Configurations</a>
</li>
</ul>
</li>
<li>
<a href="#leaderboard-competitions" class="toc-h2 toc-link" data-title="Leaderboard Competitions">Leaderboard Competitions</a>
</li>
</ul>
</li>
<li>
<a href="#conditional-tokens-framework" class="toc-h1 toc-link" data-title="Conditional Tokens Framework">Conditional Tokens Framework</a>
<ul class="toc-list-h2">
<li>
<a href="#overview-9" class="toc-h2 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#split" class="toc-h2 toc-link" data-title="Split">Split</a>
</li>
<li>
<a href="#merge" class="toc-h2 toc-link" data-title="Merge">Merge</a>
</li>
<li>
<a href="#redeem" class="toc-h2 toc-link" data-title="Redeem">Redeem</a>
</li>
<li>
<a href="#deployment" class="toc-h2 toc-link" data-title="Deployment">Deployment</a>
</li>
<li>
<a href="#resources" class="toc-h2 toc-link" data-title="Resources">Resources</a>
</li>
</ul>
</li>
<li>
<a href="#fpmms" class="toc-h1 toc-link" data-title="FPMMs">FPMMs</a>
<ul class="toc-list-h2">
<li>
<a href="#overview-10" class="toc-h2 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#add-liquidity" class="toc-h2 toc-link" data-title="Add Liquidity">Add Liquidity</a>
</li>
<li>
<a href="#remove-liquidity" class="toc-h2 toc-link" data-title="Remove Liquidity">Remove Liquidity</a>
</li>
<li>
<a href="#buy" class="toc-h2 toc-link" data-title="Buy">Buy</a>
</li>
<li>
<a href="#sell" class="toc-h2 toc-link" data-title="Sell">Sell</a>
</li>
<li>
<a href="#deployments-2" class="toc-h2 toc-link" data-title="Deployments">Deployments</a>
</li>
<li>
<a href="#resources-2" class="toc-h2 toc-link" data-title="Resources">Resources</a>
</li>
</ul>
</li>
<li>
<a href="#proxy-wallets" class="toc-h1 toc-link" data-title="Proxy Wallets">Proxy Wallets</a>
<ul class="toc-list-h2">
<li>
<a href="#overview-11" class="toc-h2 toc-link" data-title="Overview">Overview</a>
</li>
<li>
<a href="#deployments-3" class="toc-h2 toc-link" data-title="Deployments">Deployments</a>
</li>
</ul>
</li>
<li>
<a href="#bug-bounty" class="toc-h1 toc-link" data-title="Bug Bounty">Bug Bounty</a>
</li>
</ul>
<ul class="toc-footer">
<li><a href='https://XFT.com/tos'>Terms of Service</a></li>
</ul>
</div>
<div class="page-wrapper">
<div class="dark-box"></div>
<div class="content">
<h1 id='introduction'>Introduction</h1>
<p>Welcome to XFT's docs! Here developers can find all the information they need for interacting with XFT. This includes documentation on market discovery, resolution, trading etc. Whether you are an academic researcher a market maker or an indy developer, this documentation should provide you what you need to get started. All the code you find linked here and on our GitHub is open source and free to use. If you have any questions please <a href="https://discord.gg/XFT">join our discord</a> and direct your questions to the #devs channel.</p>
<h1 id='clob-api'>CLOB API</h1><h2 id='introduction-2'>Introduction</h2>
<p>Welcome to the XFT Order Book API! In this documentation you will find overviews, explanations, examples and annotations that aim to make interacting with the order book a breeze. In this section we will provide a general overview of the XFT Order Book and the purpose of the API before diving deep into the API and clients in following sections.</p>
<h3 id='system'>System</h3>
<p>XFT's Order Book, also referred to as the "CLOB" (Central Limit Order Book) or "BLOB" (Binary Limit Order Book), is hybrid-decentralized wherein there is an operator that provides off-chain matching/ordering services while settlement/execution happens on-chain, non-custodially according to instructions provided by users in the form of signed order messages. This decentralized exchange model provides users with a powerful, non-custodial exchange experience.</p>
<p>Underlying the exchange system is a custom Exchange contract that facilitates atomic swaps (settlement) between binary Outcome Tokens (both CTF ERC1155 assets and ERC20 PToken assets) and a collateral asset (ERC20) according to signed limit orders. The Exchange contract is purpose built for binary markets (instruments that allow collateral to be split into positions and conversely positions to be merged into collateral with the two positions ultimately being settled to a price equal to 1). This allows "unification" of order books such that orders for a position and its complement can be matched. Explicitly, the Exchange allows for matching operations that include a mint/merge operation which allows orders for complementary outcome tokens to be crossed.</p>
<p>Orders are represented as signed typed structured data (EIP712). When orders are matched, one side is considered the maker and the other side is considered the taker. The relationship is always either one to one or many to one (maker to taker) and any price improvement is captured by the taker. The Operator is responsible for matching, ordering, and submitting matched trades to the underlying blockchain network for execution. As such, order placement and canellation can happen immediately off-chain while only the settlement action must occur on-chain.</p>
<h3 id='api'>API</h3>
<p>The XFT Order Book API is a set of endpoints that allow market makers, traders, and other XFT users to programmatically create and manage orders for markets via access to the API provided by the operator.</p>
<p>Orders for any amount can be created and listed, or fetched and read from the order book for a given market. The API also provides data on all available markets, market prices, and order history through REST and WSS endpoints.</p>
<h3 id='security'>Security</h3>
<p>XFT's Exchange contract has been audited by Chainsecurity you can find the audit report <a href="https://github.com/XFT/ctf-exchange/blob/main/audit/ChainSecurity_XFT_Exchange_audit.pdf">here</a>.</p>
<p>The operator has no special privileges outside of ordering, this means that the only actions you must trust them with is enforcing correct ordering, not censoring and removing cancellations (orders can also be cancelled on-chain if operator is not trusted). If the operator is not doing any of these activities fairly a user can simply stop interacting with the operator. The operator is never able to set prices for users, or execute any trade on the user's behalf outside of the signed limit orders the user creates.</p>
<h3 id='fees'>Fees</h3><h4 id='schedule'>Schedule</h4>
<p><em>Subject to change</em></p>
<table><thead>
<tr>
<th style="text-align: center">Volume Level</th>
<th style="text-align: center">Maker Fee Base Rate (bps)</th>
<th style="text-align: center">Taker Fee Base Rate (bps)</th>
</tr>
</thead><tbody>
<tr>
<td style="text-align: center">>0 USDC</td>
<td style="text-align: center">0</td>
<td style="text-align: center">0</td>
</tr>
</tbody></table>
<h4 id='overview'>Overview</h4>
<p>Fees are levied in the output asset (proceeds). Fees for binary options with a complementary relationship (ie <strong><code>A</code></strong> + <strong><code>A'</code></strong> = <strong><code>C</code></strong>) must be symmetric to preserve market integrity. Symmetric means that someone selling 100 shares of <code>A</code> @ $0.99 should pay the same fee value as someone buying 100 <code>A'</code> @ $0.01. An intuition for this requires understanding that minting/merging a complementary token set for collateral can happen at any time. Fees are thus implemented in the following manner.</p>
<p>If buying (ie receiving <strong><code>A</code></strong> or <strong><code>A'</code></strong>), the fee is levied on the proceed tokens. If selling (ie receiving <strong><code>C</code></strong>), the fee is levied on the proceed collateral. The base fee rate (<code>baseFeeRate</code>) is signed into the order struct. The base fee rate corresponds to % the fee rate paid by traders when the price of the two tokens is equal (ie $0.50 and $0.50). Moving away from a centered price, the following formulas are used to calculate the fees making sure to maintain symmetry.</p>
<p><strong>Case 1:</strong> If selling outcome tokens (base) for collateral (quote):</p>
<p>$$
feeQuote = baseRate * \min(price, 1-price) * size
$$</p>
<p><strong>Case 2:</strong> If buying outcome tokens (base) with collateral (quote):</p>
<p>$$
feeBase = baseRate * \min(price, 1-price) * \frac{size}{price}
$$</p>
<h3 id='additional-resources'>Additional Resources</h3>
<ul>
<li><a href="https://github.com/XFT/ctf-exchange/tree/main/src">Exchange contract source code</a></li>
<li><a href="https://github.com/XFT/ctf-exchange/blob/main/docs/Overview.md">Exchange contract documentation</a></li>
</ul>
<h2 id='deployments'>Deployments</h2>
<p>The Exchange contract is deployed at the following addresses:</p>
<table><thead>
<tr>
<th style="text-align: center">Network</th>
<th style="text-align: center">Address</th>
</tr>
</thead><tbody>
<tr>
<td style="text-align: center"><strong>Mumbai:</strong></td>
<td style="text-align: center"><a href="https://mumbai.polygonscan.com/address/0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e"><code>0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E</code></a></td>
</tr>
<tr>
<td style="text-align: center"><strong>Polygon:</strong></td>
<td style="text-align: center"><a href="https://polygonscan.com/address/0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e"><code>0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E</code></a></td>
</tr>
</tbody></table>
<h2 id='status'>Status</h2>
<p><a href="https://status-clob.XFT.com/">https://status-clob.XFT.com/</a></p>
<h2 id='clients'>Clients</h2>
<blockquote>
<p>Installation</p>
</blockquote>
<div class="highlight"><pre class="highlight typescript tab-typescript"><code><span class="nx">npm</span> <span class="nx">i</span> <span class="o">-</span><span class="nx">s</span> <span class="p">@</span><span class="nd">XFT</span><span class="sr">/clob-clien</span><span class="err">t
</span>
<span class="nx">yarn</span> <span class="nx">add</span> <span class="p">@</span><span class="nd">XFT</span><span class="sr">/clob-clien</span><span class="err">t
</span></code></pre></div><div class="highlight"><pre class="highlight python tab-python"><code><span class="n">pip</span> <span class="n">install</span> <span class="n">py</span><span class="o">-</span><span class="n">clob</span><span class="o">-</span><span class="n">client</span>
</code></pre></div>
<p>XFT has implemented reference clients that allow programmatic use of the API below:</p>
<ul>
<li><a href="https://github.com/XFT/clob-client">clob-client</a> (Typescript)</li>
<li><a href="https://github.com/XFT/py-clob-client">py-clob-client</a> (Python)</li>
</ul>
<blockquote>
<p>Initialization</p>
</blockquote>
<div class="highlight"><pre class="highlight python tab-python"><code><span class="kn">from</span> <span class="nn">py_clob_client.client</span> <span class="kn">import</span> <span class="n">ClobClient</span>
<span class="n">host</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s">""</span>
<span class="n">key</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s">""</span>
<span class="n">chain_id</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">137</span>
<span class="c1">### Initialization of a client that trades directly from an EOA
</span><span class="n">client</span> <span class="o">=</span> <span class="n">ClobClient</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="n">key</span><span class="p">,</span> <span class="n">chain_id</span><span class="o">=</span><span class="n">chain_id</span><span class="p">)</span>
<span class="c1">### Initialization of a client using a XFT Proxy associated with an Email/Magic account
</span><span class="n">client</span> <span class="o">=</span> <span class="n">ClobClient</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="n">key</span><span class="p">,</span> <span class="n">chain_id</span><span class="o">=</span><span class="n">chain_id</span><span class="p">,</span> <span class="n">signature_type</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">funder</span><span class="o">=</span><span class="n">XFT_PROXY_ADDRESS</span><span class="p">)</span>
<span class="c1">### Initialization of a client using a XFT Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc)
</span><span class="n">client</span> <span class="o">=</span> <span class="n">ClobClient</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="n">key</span><span class="p">,</span> <span class="n">chain_id</span><span class="o">=</span><span class="n">chain_id</span><span class="p">,</span> <span class="n">signature_type</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">funder</span><span class="o">=</span><span class="n">XFT_PROXY_ADDRESS</span><span class="p">)</span>
</code></pre></div><div class="highlight"><pre class="highlight typescript tab-typescript"><code><span class="k">import</span> <span class="p">{</span> <span class="nx">ClobClient</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">"</span><span class="s2">XFT/clob-client</span><span class="dl">"</span><span class="p">;</span>
<span class="k">import</span> <span class="p">{</span> <span class="nx">SignatureType</span> <span class="p">}</span> <span class="k">from</span> <span class="dl">"</span><span class="s2">@XFT/order-utils</span><span class="dl">"</span><span class="p">;</span>
<span class="c1">// Initialization of a client that trades directly from an EOA</span>
<span class="kd">const</span> <span class="nx">clobClient</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">ClobClient</span><span class="p">(</span>
<span class="nx">host</span> <span class="k">as</span> <span class="kr">string</span><span class="p">,</span>
<span class="p">(</span><span class="k">await</span> <span class="nx">wallet</span><span class="p">.</span><span class="nx">getChainId</span><span class="p">())</span> <span class="k">as</span> <span class="kr">number</span><span class="p">,</span>
<span class="nx">wallet</span> <span class="k">as</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">Wallet</span> <span class="o">|</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">providers</span><span class="p">.</span><span class="nx">JsonRpcSigner</span>
<span class="p">);</span>
<span class="c1">// Initialization of a client using a XFT Proxy associated with an Email/Magic account</span>
<span class="kd">const</span> <span class="nx">clobClient</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">ClobClient</span><span class="p">(</span>
<span class="nx">host</span> <span class="k">as</span> <span class="kr">string</span><span class="p">,</span>
<span class="p">(</span><span class="k">await</span> <span class="nx">wallet</span><span class="p">.</span><span class="nx">getChainId</span><span class="p">())</span> <span class="k">as</span> <span class="kr">number</span><span class="p">,</span>
<span class="nx">wallet</span> <span class="k">as</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">Wallet</span> <span class="o">|</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">providers</span><span class="p">.</span><span class="nx">JsonRpcSigner</span><span class="p">,</span>
<span class="kc">undefined</span><span class="p">,</span> <span class="c1">// creds</span>
<span class="nx">SignatureType</span><span class="p">.</span><span class="nx">POLY_PROXY</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">YOUR_XFT_PROXY_ADDRESS</span><span class="dl">"</span>
<span class="p">);</span>
<span class="c1">// Initialization of a client using a XFT Proxy Wallet associated with a Browser Wallet(Metamask, Coinbase Wallet)</span>
<span class="kd">const</span> <span class="nx">clobClient</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">ClobClient</span><span class="p">(</span>
<span class="nx">host</span> <span class="k">as</span> <span class="kr">string</span><span class="p">,</span>
<span class="p">(</span><span class="k">await</span> <span class="nx">wallet</span><span class="p">.</span><span class="nx">getChainId</span><span class="p">())</span> <span class="k">as</span> <span class="kr">number</span><span class="p">,</span>
<span class="nx">wallet</span> <span class="k">as</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">Wallet</span> <span class="o">|</span> <span class="nx">ethers</span><span class="p">.</span><span class="nx">providers</span><span class="p">.</span><span class="nx">JsonRpcSigner</span><span class="p">,</span>
<span class="kc">undefined</span><span class="p">,</span> <span class="c1">// creds</span>
<span class="nx">SignatureType</span><span class="p">.</span><span class="nx">POLY_GNOSIS_SAFE</span><span class="p">,</span>
<span class="dl">"</span><span class="s2">YOUR_XFT_PROXY_ADDRESS</span><span class="dl">"</span>
<span class="p">);</span>
</code></pre></div><h3 id='order-utils'>Order Utils</h3>
<p>XFT has implemented utility libraries to programmatically sign and generate orders:</p>
<ul>
<li><a href="https://github.com/XFT/clob-order-utils">clob-order-utils</a> (Typescript)</li>
<li><a href="https://github.com/XFT/python-order-utils">python-order-utils</a> (Python)</li>
<li><a href="https://github.com/XFT/go-order-utils">go-order-utils</a> (Golang)</li>
</ul>
<h2 id='endpoints'>Endpoints</h2><h3 id='rest'>REST</h3>
<p>Used for all CLOB REST endpoints, denoted <code>{clob-endpoint}</code>.</p>
<p><strong><a href="https://clob.XFT.com/">https://clob.XFT.com/</a></strong></p>
<h3 id='websocket'>Websocket</h3>
<p>Used for all CLOB WSS endpoints, denoted <code>{wss-channel}</code>.</p>
<p><strong><a href="wss://ws-subscriptions-clob.XFT.com/ws/">wss://ws-subscriptions-clob.XFT.com/ws/</a></strong></p>
<h2 id='authentication'>Authentication</h2>
<p>There are two levels of authentication to be considered when using XFT's CLOB. All signing can be handled directly by the client libraries.</p>
<h3 id='l1-private-key-authentication'>L1: Private Key Authentication</h3>
<p>The highest level of authentication is via an account's Polygon private key. The private key remains in control of a user's funds and as such all trading is non-custodial. The operator <em>never</em> has control over users' funds.</p>
<p>Private key authentication is required for the following operations:</p>
<ul>
<li>Placing an order (for signing the order)</li>
<li>Creating or revoking API keys</li>
</ul>
<h4 id='l1-header'>L1 Header</h4>
<table><thead>
<tr>
<th style="text-align: center">Header</th>
<th style="text-align: center">Required?</th>
<th style="text-align: left">Description</th>
</tr>
</thead><tbody>
<tr>
<td style="text-align: center">POLY_ADDRESS</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">Polygon address</td>
</tr>
<tr>
<td style="text-align: center">POLY_SIGNATURE</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">CLOB EIP 712 signature</td>
</tr>
<tr>
<td style="text-align: center">POLY_TIMESTAMP</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">current UNIX timestamp</td>
</tr>
<tr>
<td style="text-align: center">POLY_NONCE</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">Nonce. Default 0</td>
</tr>
</tbody></table>
<p>The POLY_SIGNATURE is generated by signing the following EIP712 struct:</p>
<div class="highlight"><pre class="highlight typescript"><code><span class="kd">const</span> <span class="nx">domain</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">ClobAuthDomain</span><span class="dl">"</span><span class="p">,</span>
<span class="na">version</span><span class="p">:</span> <span class="dl">"</span><span class="s2">1</span><span class="dl">"</span><span class="p">,</span>
<span class="na">chainId</span><span class="p">:</span> <span class="nx">chainId</span><span class="p">,</span> <span class="c1">// Polygon ChainID 137</span>
<span class="p">};</span>
<span class="kd">const</span> <span class="nx">types</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">ClobAuth</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">address</span><span class="dl">"</span><span class="p">,</span> <span class="na">type</span><span class="p">:</span> <span class="dl">"</span><span class="s2">address</span><span class="dl">"</span> <span class="p">},</span>
<span class="p">{</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">timestamp</span><span class="dl">"</span><span class="p">,</span> <span class="na">type</span><span class="p">:</span> <span class="dl">"</span><span class="s2">string</span><span class="dl">"</span> <span class="p">},</span>
<span class="p">{</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">nonce</span><span class="dl">"</span><span class="p">,</span> <span class="na">type</span><span class="p">:</span> <span class="dl">"</span><span class="s2">uint256</span><span class="dl">"</span> <span class="p">},</span>
<span class="p">{</span> <span class="na">name</span><span class="p">:</span> <span class="dl">"</span><span class="s2">message</span><span class="dl">"</span><span class="p">,</span> <span class="na">type</span><span class="p">:</span> <span class="dl">"</span><span class="s2">string</span><span class="dl">"</span> <span class="p">},</span>
<span class="p">],</span>
<span class="p">};</span>
<span class="kd">const</span> <span class="nx">value</span> <span class="o">=</span> <span class="p">{</span>
<span class="na">address</span><span class="p">:</span> <span class="nx">signingAddress</span><span class="p">,</span> <span class="c1">// the Signing address</span>
<span class="na">timestamp</span><span class="p">:</span> <span class="nx">ts</span><span class="p">,</span> <span class="c1">// The CLOB API server timestamp</span>
<span class="na">nonce</span><span class="p">:</span> <span class="nx">nonce</span><span class="p">,</span> <span class="c1">// The nonce used</span>
<span class="na">message</span><span class="p">:</span> <span class="dl">"</span><span class="s2">This message attests that I control the given wallet</span><span class="dl">"</span><span class="p">,</span> <span class="c1">// A static message indicating that the user controls the wallet</span>
<span class="p">};</span>
<span class="kd">const</span> <span class="nx">sig</span> <span class="o">=</span> <span class="k">await</span> <span class="nx">signer</span><span class="p">.</span><span class="nx">_signTypedData</span><span class="p">(</span><span class="nx">domain</span><span class="p">,</span> <span class="nx">types</span><span class="p">,</span> <span class="nx">value</span><span class="p">);</span>
</code></pre></div>
<p>Implementations exist in the <a href="https://github.com/XFT/clob-client/blob/main/src/signing/eip712.ts">Typescript</a> and <a href="https://github.com/XFT/py-clob-client/blob/main/py_clob_client/signing/eip712.py">Python</a> clients</p>
<h3 id='l2-api-key-authentication'>L2: API Key Authentication</h3>
<p>The next level of authentication consists of the API key, secret and passphrase which are used solely to authenticate API requests made to XFT's CLOB. This includes operations such as posting/canceling orders or retrieving an account's orders and fills.</p>
<p>When a user on-boards via <code>POST</code> <code>/auth/api-key</code>, the server will use the signature as a seed to deterministically generate credentials. An API credential includes three fields:</p>
<p><strong>key</strong>: UUID identifying the credentials.</p>
<p><strong>secret</strong>: Secret string used to generate HMACs, not sent with requests.</p>
<p><strong>passphrase</strong>: Secret string sent with each request, used to encrypt/decrypt the secret in our DB, and never stored in our DB.</p>
<p>All requests which are not signed by a private key (<code>/auth/api-key</code>) and which are made to private endpoints require an API key signature.</p>
<h4 id='l2-header'>L2 Header</h4>
<table><thead>
<tr>
<th style="text-align: center">Header</th>
<th style="text-align: center">Required?</th>
<th style="text-align: left">Description</th>
</tr>
</thead><tbody>
<tr>
<td style="text-align: center">POLY_ADDRESS</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">Polygon address</td>
</tr>
<tr>
<td style="text-align: center">POLY_SIGNATURE</td>
<td style="text-align: center">yes</td>
<td style="text-align: left">HMAC signature for request</td>
</tr>
<tr>