Repository navigation
Expand file tree
/
Copy pathopenapi.json
More file actions
1037 lines (1037 loc) · 45.9 KB
/
Copy pathopenapi.json
File metadata and controls
1037 lines (1037 loc) · 45.9 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.1.0",
"info": {
"title": "DarkRoute public API",
"version": "1.4.0",
"description": "Quote and route private, non-custodial swaps through DarkRoute. Every route is public and rate-limited per IP except POST /order, which needs a partner key or a short lived token the site issues to a real page load and binds to that caller's address. The token is not a wall: a script that fetches one first can still create orders, and we would rather say so than imply a gate we do not have. Until 20 September 2026 this said a key was required outright, and the check behind it read the Origin header, which any caller sets. Reported by gege. A partner key is sent as Authorization: Bearer <key>, never in a URL. Keys are issued by hand, by email, at https://darkroute.exchange/integrate, which also sets out what a holder may and may not claim about DarkRoute. A quote never creates an order; an order returns a one-time deposit address from the venue and DarkRoute never holds funds. The fee is 0.3% of the input, printed on the quote. 1.1.0 documents GET /token/{address}/quote, which prices any token directly from its own Uniswap v4 pools on Robinhood Chain or Arc. The route itself is not new, only its entry here: it has been reachable under /v1 since the version alias existed, and leaving it undescribed meant callers had to read the app to find it. 1.4.0 documents GET /onramp, and corrects /stocks: it said the creators of these contracts could not be read, and they now are. 1.3.0 documents GET /stocks, in the same commit as the route this time rather than after it. 1.2.0 documents GET /nft/destination, which reports whether an address has ever been used. Same correction as the one above and for the same reason: the blanket /v1 alias made it public the moment it shipped, so an undocumented route is one callers can only find by reading the app. Nothing else changed.",
"contact": {
"email": "support@darkroute.exchange",
"url": "https://darkroute.exchange/api"
}
},
"servers": [
{
"url": "https://app.darkroute.exchange/api/v1"
}
],
"paths": {
"/tokens": {
"get": {
"summary": "Assets the router can quote",
"description": "188 assets across 35 chains at the time of writing, sorted popular first. Rate limit 60/min per IP.",
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokensResponse"
}
}
}
}
}
}
},
"/quote": {
"post": {
"summary": "Dry quote for a pair and amount",
"description": "Never creates an order. recipient and refundTo are optional here; when omitted a placeholder address is used so the venue will quote. Rate limit 40/min per IP.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QuoteRequest"
}
}
}
},
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QuoteResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"429": {
"$ref": "#/components/responses/Slow"
}
}
}
},
"/order": {
"post": {
"summary": "Create an order and get the one-time deposit address",
"description": "Non-custodial: the venue issues the deposit address; funds go from the sender into the route. The order id is the only credential for the status endpoint, so treat it as a secret. Needs a partner key (Authorization: Bearer <key>), or an x-order-token from GET /api/order/token, which the site issues to a page load and binds to the caller's IP for two minutes. Rate limit 10/min per IP.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrderRequest"
}
}
}
},
"responses": {
"201": {
"description": "created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"id": {
"type": "string",
"example": "dr_4f2a9c31be07"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"401": {
"description": "no partner key and no valid order token, or a revoked key. See https://darkroute.exchange/integrate"
},
"429": {
"$ref": "#/components/responses/Slow"
},
"502": {
"description": "venue did not return a deposit address"
}
},
"security": [
{
"partnerKey": []
}
]
}
},
"/order/{id}": {
"get": {
"summary": "Order status, deposit address and receipt data",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^dr_[a-f0-9]{12}$"
}
}
],
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrderResponse"
}
}
}
},
"404": {
"description": "unknown order"
}
}
}
},
"/token/{address}/quote": {
"get": {
"summary": "What a token costs to trade, read from its own Uniswap v4 pools",
"description": "On-chain pricing for any token on Robinhood Chain or Arc, quoted through the v4 quoter rather than a listing. Returns the best pool we found and what the least favourable one that answered would have paid, so the spread between them is visible rather than claimed. ?chain=arc reads Arc; omitted, it reads Robinhood Chain. The route asset differs per chain: ETH on Robinhood Chain, USDC on Arc, where 78.7% of pools are quoted in USDC and only 1.7% in native. A token whose only pool is against something else gets no route and is told so. `chain.tradable` is false on Arc, and the limit is ours rather than the chain's: a UniversalRouter is deployed there and carries most of Arc's v4 swaps, but our swap path is still wired to Robinhood Chain, so we will not offer to send a fill we cannot address correctly. `chain.router` names the router we found, so a caller can route around us. Rate limit 60/min per IP.",
"parameters": [
{
"name": "address",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
},
{
"name": "chain",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"rh",
"arc"
],
"default": "rh"
}
},
{
"name": "buy",
"in": "query",
"required": false,
"schema": {
"type": "number"
},
"description": "amount of the route asset to spend. One of buy or sell is required."
},
{
"name": "sell",
"in": "query",
"required": false,
"schema": {
"type": "number"
},
"description": "amount of the token to sell"
}
],
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenQuoteResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"404": {
"description": "no contract at that address on this chain"
},
"429": {
"$ref": "#/components/responses/Slow"
},
"503": {
"description": "no pool could fill that size, or the chain could not be read. These are distinguished in `error`: a chain we cannot reach is never reported as a token that does not exist."
}
}
}
},
"/nft/destination": {
"get": {
"summary": "Whether a destination address has ever been used",
"description": "For the NFT checkout flow, where the claim is that everyone knows an address bought the NFT and nobody knows the address is you. That only holds while the address has no history, so this reports one. Three signals, any one of them enough: a nonce above zero (it has sent transactions), contract code (a contract or a delegated account), or a balance (something arrived, and whoever sent it can watch what happens next). Each refusal carries its reason in plain words, meant to be shown to a person. Read only, nothing stored, nothing logged: the address does not leave the request. A chain we cannot reach answers 503 and never \"fresh\", because reporting our own outage as a clean address would be worse than having no check. A malformed address answers 400 rather than blaming the chain. Rate limit 60/min per IP.",
"parameters": [
{
"name": "address",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
}
},
{
"name": "chain",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"rh",
"arc"
],
"default": "rh"
}
}
],
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DestinationResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"429": {
"$ref": "#/components/responses/Slow"
},
"503": {
"description": "the chain could not be read; the address is never reported as unused on our own failure"
}
}
}
},
"/stocks": {
"get": {
"summary": "Which token behind a stock ticker matches the Robinhood token family",
"description": "Every stock ticker on Robinhood Chain has copies. Two checks decide which token behind a ticker is which. The shape: every token named \"<Company> • Robinhood Token\" we have found is the same BeaconProxy bytecode pointed at the same beacon, and none of the copies are. The creator: measured 10 October 2026 through an archive node, all 17 family tokens were created by the StockFactory at 0x4783c67b63de2b358ac5951a7d41f47a38f3c046, called from 0x5516b3451d4d6c9f63353fe7bc9537477ecce000, and none of the 14 copies were. Replaying a fresh creation through that factory succeeded from that account and was refused from three other addresses we tried; other permitted accounts cannot be ruled out. `standing` is family, impostor or other. impostor means either a name that claims to be a Robinhood Token on a contract that fails the shape test, or the family shape on a contract we can show was created outside the factory. `creator` is factory, elsewhere or unread, and is null for tokens that fail the shape test. unread means our own lookup failed or was not attempted (no archive access, capacity, timeout); standing then stays family, so `standing === \"family\"` alone is not a match: a match is standing family with creator factory. `provenance` carries the block and transaction where we have them, and `creationsAt` dates the creator research. Still not proof of who controls the account that calls the factory, so nothing here says official or verified. Identity only; no exit cost is returned. The ticker list is sampled from chain activity and dated in `sampledAt`; a contract passed directly is checked live. Without q, returns the sampled tickers. Rate limit 30/min per IP.",
"parameters": [
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "a ticker (AAPL, $aapl) or a contract address"
}
],
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StocksResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"404": {
"description": "no stock token with that ticker in our sample, and no contract at that address"
},
"429": {
"$ref": "#/components/responses/Slow"
},
"503": {
"description": "Robinhood Chain could not be read; nothing is reported as a family member on our own failure"
}
}
}
},
"/onramp": {
"get": {
"summary": "Routes into Robinhood Chain from other chains, priced live",
"description": "Answers how to get funds into Robinhood Chain. For a destination on Robinhood Chain (ETH by default, or USDG with ?to=usdg), every listed origin asset is quoted as a dry quote at about `targetUsd` dollars of the origin, with placeholder addresses, so rows compare. Nothing here opens a deposit address. `venue` names who fills the routes. `etaSeconds` is the venue's own estimate and includes the origin chain's confirmations; we have not timed completed transfers against it. `fee` is our fee at the full rate; a $DARK holder's discount is applied on the swap card's own quote. A row that did not quote stays in `rows` with `error` and `errorKind` (refused, venue_error, timeout, unreachable, no_price, unavailable): only for refused is `error` the venue's own words, and `minimumUsd` is set when a refusal was a size minimum. The table is cached per destination, see `computedAt` and `maxAgeSeconds`, so polling faster returns the same numbers. Rate limit 20/min per IP.",
"parameters": [
{
"name": "to",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"eth",
"usdg"
],
"default": "eth"
}
}
],
"responses": {
"200": {
"description": "ok",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OnrampResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/Bad"
},
"429": {
"$ref": "#/components/responses/Slow"
}
}
}
},
"/stats": {
"get": {
"summary": "Router aggregates since launch",
"description": "Orders, settled, settled volume USD, gross fee USD, burned. No per-user data. Cached 60 s.",
"responses": {
"200": {
"description": "ok"
}
}
}
},
"/burns": {
"get": {
"summary": "Buybacks and burns with hashes, plus the two live supply numbers",
"responses": {
"200": {
"description": "ok"
}
}
}
},
"/supply": {
"get": {
"summary": "Max, total and circulating supply, each with the basis it was computed from",
"responses": {
"200": {
"description": "ok"
}
}
}
},
"/supply/total": {
"get": {
"summary": "Total supply as one bare number in text/plain, for listing sites",
"responses": {
"200": {
"description": "a number, e.g. 942293314.337855",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"503": {
"description": "the chain could not be read; no number is guessed"
}
}
}
},
"/supply/circulating": {
"get": {
"summary": "Circulating supply as one bare number in text/plain. Excludes the tokens the launchpad locked permanently, so it reads lower than total minus the dead address",
"responses": {
"200": {
"description": "a number, e.g. 860660661.276631",
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
}
},
"503": {
"description": "the chain could not be read; no number is guessed"
}
}
}
}
},
"components": {
"securitySchemes": {
"partnerKey": {
"type": "http",
"scheme": "bearer",
"description": "Issued by hand at https://darkroute.exchange/integrate. Send it as a header; a key in a URL reaches server logs, proxy logs, browser history and Referer headers, and then has to be replaced."
}
},
"responses": {
"Bad": {
"description": "validation error, message in `error`"
},
"Slow": {
"description": "rate limited, try again in a minute"
}
},
"schemas": {
"OnrampResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"to": {
"enum": [
"eth",
"usdg"
]
},
"destination": {
"type": "object"
},
"targetUsd": {
"type": "number"
},
"slippageBps": {
"type": "number"
},
"venue": {
"type": "string"
},
"fee": {
"type": "object"
},
"computedAt": {
"type": "number",
"description": "ms since epoch"
},
"maxAgeSeconds": {
"type": "number"
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"origin": {
"type": "object"
},
"send": {
"type": [
"object",
"null"
]
},
"receive": {
"type": [
"object",
"null"
],
"description": "amount, min and usd; null whenever error is set"
},
"etaSeconds": {
"type": [
"number",
"null"
]
},
"venue": {
"type": "string"
},
"fee": {
"type": "object"
},
"error": {
"type": [
"string",
"null"
]
},
"errorKind": {
"type": [
"string",
"null"
],
"enum": [
"refused",
"venue_error",
"timeout",
"unreachable",
"no_price",
"unavailable",
null
]
},
"minimumUsd": {
"type": [
"number",
"null"
]
},
"rank": {
"type": "number"
}
}
}
}
}
},
"StocksResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"query": {
"type": "string"
},
"ticker": {
"type": [
"string",
"null"
]
},
"sampledAt": {
"type": "string",
"format": "date"
},
"tokens": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"symbol": {
"type": [
"string",
"null"
]
},
"supply": {
"type": [
"number",
"null"
]
},
"codeHash": {
"type": [
"string",
"null"
]
},
"beacon": {
"type": [
"string",
"null"
]
},
"standing": {
"enum": [
"family",
"impostor",
"other"
]
},
"shape": {
"enum": [
"family",
"impostor",
"other"
]
},
"creator": {
"type": [
"string",
"null"
],
"enum": [
"factory",
"elsewhere",
"unread",
null
]
},
"provenance": {
"type": [
"object",
"null"
]
}
}
}
},
"creationsAt": {
"type": "string",
"format": "date"
}
}
},
"DestinationResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"fresh": {
"type": "boolean",
"description": "true only when none of the three signals fired"
},
"reasons": {
"type": "array",
"items": {
"type": "string"
},
"description": "present only when fresh is false. One plain sentence per signal, written to be shown to a person rather than parsed."
}
},
"required": [
"ok",
"fresh"
]
},
"TokenQuoteResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"chain": {
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "arc"
},
"id": {
"type": "integer",
"example": 5042
},
"name": {
"type": "string"
},
"routeAsset": {
"type": "string",
"example": "USDC"
},
"router": {
"type": "string",
"nullable": true,
"description": "the UniversalRouter we found on this chain, or null when none is deployed"
},
"tradable": {
"type": "boolean",
"description": "false when DarkRoute will not send a fill here. Read `router` to tell the two reasons apart: null means the chain has none, an address means ours is the missing half"
}
}
},
"direction": {
"type": "string",
"enum": [
"buy",
"sell"
]
},
"token": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"symbol": {
"type": "string",
"nullable": true
},
"decimals": {
"type": "integer"
}
}
},
"route": {
"type": "object",
"nullable": true,
"properties": {
"poolId": {
"type": "string"
},
"key": {
"type": "object",
"description": "the v4 PoolKey: currency0, currency1, fee, tickSpacing, hooks"
},
"zeroForOne": {
"type": "boolean"
},
"out": {
"type": "number",
"description": "whole units of the output asset"
},
"lpFeePct": {
"type": "number"
},
"hooked": {
"type": "boolean",
"description": "the pool has a hook, which can take a cut on top of the LP fee; the cost below already includes it"
},
"allInPct": {
"type": "number",
"nullable": true,
"description": "everything between the pool price and what lands"
},
"considered": {
"type": "integer"
},
"worst": {
"type": "number",
"nullable": true
},
"worstFeePct": {
"type": "number",
"nullable": true
}
}
},
"alt": {
"type": "object",
"nullable": true,
"description": "an outside quote from route.fun, already net of their fee, on Robinhood Chain buys only. Shown so the comparison is visible; we do not execute through them."
},
"note": {
"type": "string"
}
}
},
"TokensResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"venue": {
"type": "string"
},
"tokens": {
"type": "array",
"items": {
"type": "object",
"properties": {
"assetId": {
"type": "string",
"example": "nep141:eth.omft.near"
},
"symbol": {
"type": "string"
},
"blockchain": {
"type": "string",
"example": "eth"
},
"decimals": {
"type": "integer"
},
"price": {
"type": "number",
"nullable": true
},
"contractAddress": {
"type": "string",
"nullable": true
}
}
}
}
}
},
"QuoteRequest": {
"type": "object",
"required": [
"originAsset",
"destinationAsset",
"amount"
],
"properties": {
"originAsset": {
"type": "string",
"description": "assetId from /tokens"
},
"destinationAsset": {
"type": "string"
},
"amount": {
"type": "string",
"description": "human units of the origin asset, e.g. \"0.1\""
},
"recipient": {
"type": "string",
"nullable": true
},
"refundTo": {
"type": "string",
"nullable": true
},
"slippageBps": {
"type": "integer",
"description": "clamped by the server",
"nullable": true
}
}
},
"QuoteResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"venue": {
"type": "string",
"example": "NEAR Intents"
},
"kind": {
"type": "string"
},
"out": {
"type": "number"
},
"minOut": {
"type": "number"
},
"outUsd": {
"type": "number",
"nullable": true
},
"etaSeconds": {
"type": "integer",
"nullable": true
},
"networkFeePct": {
"type": "number"
}
}
}
},
"fee": {
"type": "object",
"properties": {
"chargedPct": {
"type": "number"
},
"referencePct": {
"type": "number"
},
"chargedUsd": {
"type": "number"
},
"beta": {
"type": "boolean"
}
}
},
"tier": {
"type": "object"
},
"cashback": {
"type": "object"
},
"cost": {
"type": "object",
"properties": {
"midOut": {
"type": "number",
"nullable": true
},
"allInPct": {
"type": "number",
"nullable": true,
"description": "everything between mid-market and what lands; negative when the route beats mid"
}
}
}
}
},
"OrderRequest": {
"type": "object",
"required": [
"originAsset",
"destinationAsset",
"amount",
"recipient",
"refundTo"
],
"properties": {
"originAsset": {
"type": "string"
},
"destinationAsset": {
"type": "string"
},
"amount": {
"type": "string"
},
"recipient": {
"type": "string",
"description": "must match the destination chain's address shape"
},
"refundTo": {
"type": "string",
"description": "must match the origin chain's address shape"
},
"slippageBps": {
"type": "integer",
"nullable": true
}
}
},
"OrderResponse": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"order": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"venue": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PENDING_DEPOSIT",
"KNOWN_DEPOSIT_TX",
"PROCESSING",
"SUCCESS",
"REFUNDED",
"FAILED",
"INCOMPLETE_DEPOSIT"
]
},
"stage": {
"type": "object"
},
"from": {
"type": "object"
},
"to": {
"type": "object"
},