-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-reference.yaml
More file actions
6180 lines (6008 loc) · 287 KB
/
api-reference.yaml
File metadata and controls
6180 lines (6008 loc) · 287 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Across Protocol API
description: API documentation for Across Protocol services.
version: 0.1.0
x-gitbook-description-document:
object: document
data:
schemaVersion: 9
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: API documentation for Across Protocol services.
marks: []
key: UTBsP3rI8gea
key: Z3cEFDkXv2dV
key: 84ZvEwRHHdAX
x-gitbook-description-html: <p>API documentation for Across Protocol services.</p>
servers:
- url: https://app.across.to/api
- url: https://testnet.across.to/api
paths:
/suggested-fees:
get:
x-codeSamples:
- lang: bash
label: Curl
source: |
curl -L \
'https://app.across.to/api/suggested-fees?inputToken=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&outputToken=0x4200000000000000000000000000000000000006&originChainId=1&destinationChainId=10&amount=1000000000000000000'
summary: Retrieve suggested fee quote for a deposit.
description: >
Returns suggested fees based on `inputToken`, `outputToken`,
`originChainId`, `destinationChainId`, and `amount`. Also includes
transfer limits of the system and data used to compute the fees.
parameters:
- name: inputToken
in: query
required: true
schema:
type: string
examples:
default:
value: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
description: >
Address of token to bridge on the _origin_ chain. Must be used
together with parameter `outputToken`. For ETH, use the wrapped
address, like WETH.
Note that the address provided must exist on the specified
`originChainId` below.
x-gitbook-description-html: >-
<p>Address of token to bridge on the <em>origin</em> chain. Must be
used together with parameter <code>outputToken</code>. For ETH, use
the wrapped address, like WETH.</p>
<p>Note that the address provided must exist on the specified
<code>originChainId</code> below.</p>
- name: outputToken
in: query
required: true
schema:
type: string
examples:
default:
value: '0x4200000000000000000000000000000000000006'
description: >
Address of token to bridge on the _destination_ chain. Must be used
together with parameter `inputToken`. For ETH, use the wrapped
address, like WETH.
Note that the address provided must exist on the specified
`destinationChainId` below.
x-gitbook-description-html: >-
<p>Address of token to bridge on the <em>destination</em> chain.
Must be used together with parameter <code>inputToken</code>. For
ETH, use the wrapped address, like WETH.</p>
<p>Note that the address provided must exist on the specified
<code>destinationChainId</code> below.</p>
- name: originChainId
in: query
required: true
description: |
Chain ID where the specified `inputToken` exists.
schema:
allOf:
- $ref: '#/components/schemas/ChainId'
examples:
default:
value: 1
x-gitbook-description-html: <p>Chain ID where the specified <code>inputToken</code> exists.</p>
- name: destinationChainId
in: query
required: true
description: |
The desired destination chain ID of the bridge transfer.
schema:
allOf:
- $ref: '#/components/schemas/ChainId'
examples:
default:
value: 10
x-gitbook-description-html: <p>The desired destination chain ID of the bridge transfer.</p>
- name: amount
in: query
required: true
description: >
Amount of the token to transfer.
Note that this amount is in the native decimals of the token. So,
for WETH, this would be the amount of human-readable WETH multiplied
by 1e18. For USDC, you would multiply the number of human-readable
USDC by 1e6.
schema:
type: integer
minimum: 1
examples:
default:
value: '1000000000000000000'
x-gitbook-description-html: >-
<p>Amount of the token to transfer.</p>
<p>Note that this amount is in the native decimals of the token. So,
for WETH, this would be the amount of human-readable WETH multiplied
by 1e18. For USDC, you would multiply the number of human-readable
USDC by 1e6.</p>
- name: recipient
in: query
required: false
description: >
Recipient of the deposit. Can be an EOA or a contract. If this is an
EOA and message is defined, then the API will throw a 4xx error.
_Example_: 0xc186fA914353c44b2E33eBE05f21846F1048bEda
schema:
type: string
x-gitbook-description-html: >-
<p>Recipient of the deposit. Can be an EOA or a contract. If this is
an EOA and message is defined, then the API will throw a 4xx
error.</p>
<p><em>Example</em>: 0xc186fA914353c44b2E33eBE05f21846F1048bEda</p>
- name: message
in: query
required: false
description: >
Calldata passed to the `recipient` if `recipient` is a contract
address. This calldata is passed to the recipient via the
recipient's handleV3AcrossMessage() public function.
_Example:_ 0xABC123
schema:
type: string
x-gitbook-description-html: >-
<p>Calldata passed to the <code>recipient</code> if
<code>recipient</code> is a contract address. This calldata is
passed to the recipient via the recipient's handleV3AcrossMessage()
public function.
<em>Example:</em> 0xABC123</p>
- name: relayer
in: query
required: false
description: >
Optionally override the relayer address used to simulate the
fillRelay() call that estimates the gas costs needed to fill a
deposit. This simulation result impacts the returned suggested-fees.
The reason to customize the EOA would be primarily if the
recipientAddress is a contract and requires a certain relayer to
submit the fill, or if one specific relayer has the necessary token
balance to make the fill.
_Example:_ 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010
schema:
type: string
x-gitbook-description-html: >-
<p>Optionally override the relayer address used to simulate the
fillRelay() call that estimates the gas costs needed to fill a
deposit. This simulation result impacts the returned suggested-fees.
The reason to customize the EOA would be primarily if the
recipientAddress is a contract and requires a certain relayer to
submit the fill, or if one specific relayer has the necessary token
balance to make the fill.</p>
<p><em>Example:</em> 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010</p>
- name: timestamp
in: query
required: false
description: >
The quote timestamp used to compute the LP fees. When bridging with
across, the user only specifies the quote timestamp in their
transaction. The relayer then determines the utilization at that
timestamp to determine the user's fee. This timestamp must be close
(within 10 minutes or so) to the current time on the chain where the
user is depositing funds and it should be <= the current block
timestamp on mainnet. This allows the user to know exactly what LP
fee they will pay before sending the transaction.
If this value isn't provided in the request, the API will assume the
latest block timestamp on mainnet.
_Example:_ 1653547649
schema:
type: integer
x-gitbook-description-html: >-
<p>The quote timestamp used to compute the LP fees. When bridging
with across, the user only specifies the quote timestamp in their
transaction. The relayer then determines the utilization at that
timestamp to determine the user's fee. This timestamp must be close
(within 10 minutes or so) to the current time on the chain where the
user is depositing funds and it should be <= the current block
timestamp on mainnet. This allows the user to know exactly what LP
fee they will pay before sending the transaction.</p>
<p>If this value isn't provided in the request, the API will assume
the latest block timestamp on mainnet.</p>
<p><em>Example:</em> 1653547649</p>
- name: allowUnmatchedDecimals
in: query
required: false
description: >
Used to define whether you want to allow unmatched decimals between
the input and output tokens. For tokens with mismatched decimals in
the origin and destination chain the API will throw an error if this
is not explicitly set to true. Defaults to false.
schema:
type: boolean
examples:
default:
value: false
x-gitbook-description-html: >-
<p>Used to define whether you want to allow unmatched decimals
between the input and output tokens. For tokens with mismatched
decimals in the origin and destination chain the API will throw an
error if this is not explicitly set to true. Defaults to false.</p>
responses:
'200':
description: Suggested fees for the transaction and supporting data
content:
application/json:
schema:
$ref: '#/components/schemas/SuggestedFees'
example:
estimatedFillTimeSec: 2
capitalFeePct: '78750000000001'
capitalFeeTotal: '78750000000001'
relayGasFeePct: '155024308002'
relayGasFeeTotal: '155024308002'
relayFeePct: '78905024308003'
relayFeeTotal: '78905024308003'
lpFeePct: '0'
timestamp: '1754342087'
isAmountTooLow: false
quoteBlock: '23070320'
exclusiveRelayer: '0x394311A6Aaa0D8E3411D8b62DE4578D41322d1bD'
exclusivityDeadline: 1754342267
spokePoolAddress: '0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5'
destinationSpokePoolAddress: '0x6f26Bf09B1C792e3228e5467807a900A503c0281'
totalRelayFee:
pct: '78905024308003'
total: '78905024308003'
relayerCapitalFee:
pct: '78750000000001'
total: '78750000000001'
relayerGasFee:
pct: '155024308002'
total: '155024308002'
lpFee:
pct: '0'
total: '0'
limits:
minDeposit: '134862494200912'
maxDeposit: '1661211802629989209324'
maxDepositInstant: '231397155893653275446'
maxDepositShortDelay: '1661211802629989209324'
recommendedDepositInstant: '231397155893653275446'
fillDeadline: '1754353917'
outputAmount: '999921094975691997'
inputToken:
address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
symbol: ETH
decimals: 18
chainId: 1
outputToken:
address: '0x4200000000000000000000000000000000000006'
symbol: ETH
decimals: 18
chainId: 10
id: xn8fx-1754342218143-67be35cfbdb6
x-gitbook-description-html: <p>Suggested fees for the transaction and supporting data</p>
'400':
description: Bad request due to invalid input parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/AcrossApiError'
example:
type: AcrossApiError
code: AMOUNT_TOO_HIGH
status: 400
message: Amount exceeds max. deposit limit- 20003.800721 USDzC
x-gitbook-description-html: <p>Bad request due to invalid input parameter.</p>
'500':
description: Unexpected error within the API
content:
application/json:
schema:
$ref: '#/components/schemas/AcrossApiError'
example:
type: AcrossApiError
code: INTERNAL_SERVER_ERROR
status: 500
message: Internal server error
x-gitbook-description-html: <p>Unexpected error within the API</p>
x-gitbook-description-document:
object: document
data:
schemaVersion: 9
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Returns suggested fees based on '
marks: []
- object: leaf
text: inputToken
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: outputToken
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: originChainId
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: destinationChainId
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', and '
marks: []
- object: leaf
text: amount
marks:
- object: mark
type: code
data: {}
- object: leaf
text: >-
. Also includes transfer limits of the system and data
used to compute the fees.
marks: []
key: KofDFx7lzHCp
key: RTmPDiXbUHLy
key: x33uDQizs4Wt
x-gitbook-description-html: >-
<p>Returns suggested fees based on <code>inputToken</code>,
<code>outputToken</code>, <code>originChainId</code>,
<code>destinationChainId</code>, and <code>amount</code>. Also includes
transfer limits of the system and data used to compute the fees.</p>
/limits:
get:
x-codeSamples:
- lang: bash
label: Curl
source: |
curl -L \
'https://app.across.to/api/limits?inputToken=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&outputToken=0x4200000000000000000000000000000000000006&originChainId=1&destinationChainId=10'
summary: Retrieve current transfer limits of the system
description: >-
Returns transfer limits for `inputToken`, `outputToken`,
`originChainId`, and `destinationChainId`.
parameters:
- name: inputToken
in: query
required: true
schema:
type: string
examples:
default:
value: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
description: >
Address of token to bridge on the _origin_ chain. Must be used
together with parameter `outputToken`. For ETH, use the wrapped
address, like WETH.
Note that the address provided must exist on the specified
`originChainId`.
x-gitbook-description-html: >-
<p>Address of token to bridge on the <em>origin</em> chain. Must be
used together with parameter <code>outputToken</code>. For ETH, use
the wrapped address, like WETH.</p>
<p>Note that the address provided must exist on the specified
<code>originChainId</code>.</p>
- name: outputToken
in: query
required: true
schema:
type: string
examples:
default:
value: '0x4200000000000000000000000000000000000006'
description: >
Address of token to bridge on the _destination_ chain. Must be used
together with parameter `inputToken`. For ETH, use the wrapped
address, like WETH.
Note that the address provided must match the token address on the
specified `destinationChainId` below.
x-gitbook-description-html: >-
<p>Address of token to bridge on the <em>destination</em> chain.
Must be used together with parameter <code>inputToken</code>. For
ETH, use the wrapped address, like WETH.</p>
<p>Note that the address provided must match the token address on
the specified <code>destinationChainId</code> below.</p>
- name: originChainId
in: query
required: true
description: |
Chain ID where the specified `inputToken` exists.
schema:
allOf:
- $ref: '#/components/schemas/ChainId'
examples:
default:
value: 1
x-gitbook-description-html: <p>Chain ID where the specified <code>inputToken</code> exists.</p>
- name: destinationChainId
in: query
required: true
description: |
The intended destination chain ID of the bridge transfer.
schema:
allOf:
- $ref: '#/components/schemas/ChainId'
examples:
default:
value: 10
x-gitbook-description-html: <p>The intended destination chain ID of the bridge transfer.</p>
- name: amount
in: query
required: false
description: >
Amount of the token to transfer.
Note that this amount is in the native decimals of the token. So,
for WETH, this would be the amount of human-readable WETH multiplied
by 1e18. For USDC, you would multiply the number of human-readable
USDC by 1e6.
schema:
type: integer
minimum: 1
examples:
default:
value: '1000000000000000000'
x-gitbook-description-html: >-
<p>Amount of the token to transfer.</p>
<p>Note that this amount is in the native decimals of the token. So,
for WETH, this would be the amount of human-readable WETH multiplied
by 1e18. For USDC, you would multiply the number of human-readable
USDC by 1e6.</p>
- name: recipient
in: query
required: false
description: >
Recipient of the deposit. Can be an EOA or a contract. If this is an
EOA and message is defined, then the API will throw a 4xx error.
_Example_: 0xc186fA914353c44b2E33eBE05f21846F1048bEda
schema:
type: string
x-gitbook-description-html: >-
<p>Recipient of the deposit. Can be an EOA or a contract. If this is
an EOA and message is defined, then the API will throw a 4xx
error.</p>
<p><em>Example</em>: 0xc186fA914353c44b2E33eBE05f21846F1048bEda</p>
- name: message
in: query
required: false
description: >
Calldata passed to the `recipient` if `recipient` is a contract
address. This calldata is passed to the recipient via the
recipient's handleV3AcrossMessage() public function.
_Example:_ 0xABC123
schema:
type: string
x-gitbook-description-html: >-
<p>Calldata passed to the <code>recipient</code> if
<code>recipient</code> is a contract address. This calldata is
passed to the recipient via the recipient's handleV3AcrossMessage()
public function.
<em>Example:</em> 0xABC123</p>
- name: relayer
in: query
required: false
description: >
Optionally override the relayer address used to simulate the
fillRelay() call that estimates the gas costs needed to fill a
deposit. This simulation result impacts the returned suggested-fees.
The reason to customize the EOA would be primarily if the
recipientAddress is a contract and requires a certain relayer to
submit the fill, or if one specific relayer has the necessary token
balance to make the fill.
_Example:_ 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010
schema:
type: string
x-gitbook-description-html: >-
<p>Optionally override the relayer address used to simulate the
fillRelay() call that estimates the gas costs needed to fill a
deposit. This simulation result impacts the returned suggested-fees.
The reason to customize the EOA would be primarily if the
recipientAddress is a contract and requires a certain relayer to
submit the fill, or if one specific relayer has the necessary token
balance to make the fill.</p>
<p><em>Example:</em> 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010</p>
- name: allowUnmatchedDecimals
in: query
required: false
description: >
Used to define whether you want to allow unmatched decimals between
the input and output tokens. For tokens with mismatched decimals in
the origin and destination chain the API will throw an error if this
is not explicitly set to true. Defaults to false.
schema:
type: boolean
examples:
default:
value: false
x-gitbook-description-html: >-
<p>Used to define whether you want to allow unmatched decimals
between the input and output tokens. For tokens with mismatched
decimals in the origin and destination chain the API will throw an
error if this is not explicitly set to true. Defaults to false.</p>
responses:
'200':
description: Transfer limits
content:
application/json:
schema:
$ref: '#/components/schemas/TransferLimits'
example:
minDeposit: '134349011863017'
maxDeposit: '1659439975009194758428'
maxDepositInstant: '231397155893653275446'
maxDepositShortDelay: '1659439975009194758428'
recommendedDepositInstant: '231397155893653275446'
relayerFeeDetails:
relayFeeTotal: '141442042216'
relayFeePercent: '1414420422160000000000000000'
gasFeeTotal: '141442042216'
gasFeePercent: '1414420422160000000000000000'
capitalFeeTotal: '0'
capitalFeePercent: '0'
gasFeeDetails:
nativeGasCost: '137265'
opStackL1GasCost: '3993981356'
gasPrice: '1000740'
tokenGasCost: '141360557456'
x-gitbook-description-html: <p>Transfer limits</p>
'400':
description: Bad request due to invalid input parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/AcrossApiError'
example:
type: AcrossApiError
code: MISSING_PARAM
status: 400
message: >-
Query param 'token' or 'inputToken' and 'outputToken' must be
provided
x-gitbook-description-html: <p>Bad request due to invalid input parameter.</p>
'500':
description: Unexpected error within the API
content:
application/json:
schema:
$ref: '#/components/schemas/AcrossApiError'
example:
type: AcrossApiError
code: INTERNAL_SERVER_ERROR
status: 500
message: Internal server error
x-gitbook-description-html: <p>Unexpected error within the API</p>
x-gitbook-description-document:
object: document
data:
schemaVersion: 9
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: 'Returns transfer limits for '
marks: []
- object: leaf
text: inputToken
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: outputToken
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', '
marks: []
- object: leaf
text: originChainId
marks:
- object: mark
type: code
data: {}
- object: leaf
text: ', and '
marks: []
- object: leaf
text: destinationChainId
marks:
- object: mark
type: code
data: {}
- object: leaf
text: .
marks: []
key: jj3c7QL6HeRL
key: AUN7YThszqAD
key: 6toytxLKQbXt
x-gitbook-description-html: >-
<p>Returns transfer limits for <code>inputToken</code>,
<code>outputToken</code>, <code>originChainId</code>, and
<code>destinationChainId</code>.</p>
/available-routes:
get:
summary: Retrieve available routes for transfers
description: Returns available routes based on specified parameters.
parameters:
- name: originChainId
in: query
required: false
example: 1
description: |
Chain ID of the originating chain.
schema:
allOf:
- example: 1
- $ref: '#/components/schemas/ChainId'
x-gitbook-description-html: <p>Chain ID of the originating chain.</p>
- name: destinationChainId
in: query
required: false
example: 10
description: |
Chain ID of the destination chain.
schema:
allOf:
- example: 10
- $ref: '#/components/schemas/ChainId'
x-gitbook-description-html: <p>Chain ID of the destination chain.</p>
- name: originToken
in: query
required: false
description: |
Origin chain address of token contract to transfer.
_Example:_ 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
example: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
schema:
type: string
x-gitbook-description-html: |-
<p>Origin chain address of token contract to transfer.</p>
<p><em>Example:</em> 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2</p>
- name: destinationToken
in: query
required: false
example: '0x4200000000000000000000000000000000000006'
description: |
Destination chain address of token contract to receive.
_Example:_ 0x4200000000000000000000000000000000000006
schema:
type: string
x-gitbook-description-html: |-
<p>Destination chain address of token contract to receive.</p>
<p><em>Example:</em> 0x4200000000000000000000000000000000000006</p>
responses:
'200':
description: List of available routes
content:
application/json:
example:
- originChainId: 1
originToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
destinationChainId: 10
destinationToken: '0x4200000000000000000000000000000000000006'
originTokenSymbol: WETH
destinationTokenSymbol: WETH
isNative: false
- originChainId: 1
originToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
destinationChainId: 10
destinationToken: '0x4200000000000000000000000000000000000006'
originTokenSymbol: ETH
destinationTokenSymbol: ETH
isNative: true
x-gitbook-description-html: <p>List of available routes</p>
'400':
description: Invalid input
x-gitbook-description-html: <p>Invalid input</p>
content:
application/json:
example:
type: AcrossApiError
code: INVALID_PARAM
status: 400
message: Invalid parameter at path 'originToken'. Expected type 'union'
param: originToken
'500':
description: Unexpected error within the API
x-gitbook-description-html: <p>Unexpected error within the API</p>
content:
application/json:
example:
type: AcrossApiError
code: INTERNAL_SERVER_ERROR
status: 500
message: Internal server error
x-gitbook-description-document:
object: document
data:
schemaVersion: 9
nodes:
- object: block
type: paragraph
isVoid: false
data: {}
nodes:
- object: text
leaves:
- object: leaf
text: Returns available routes based on specified parameters.
marks: []
key: h1Q9HUxy1Ak3
key: UOrOmYyoeGNi
key: v4RmdCZKpRK5
x-gitbook-description-html: <p>Returns available routes based on specified parameters.</p>
/deposit/status:
get:
summary: Track the lifecycle of a deposit
description: >
Returns the fill status of a deposit along with a corresponding fill
transaction hash if filled.
This endpoint loads data queried by an indexing service that polls
relevant events on a 10-second cadence.
Users should therefore expect an average latency of 1 to 15 seconds
after submitting a deposit to see the status changed in this endpoint.
This delay comes from the time it takes for the internal indexing to
include the deposit transaction.
parameters:
- name: originChainId
in: query
required: false
description: >
Chain Id where the deposit originated from. This must be used in
conjunction with depositId. depositTxHash is not required when using
this parameter.
schema:
allOf:
- $ref: '#/components/schemas/ChainId'
examples:
default:
value: 137
x-gitbook-description-html: >-
<p>Chain Id where the deposit originated from. This must be used in
conjunction with depositId. depositTxHash is not required when using
this parameter.</p>
- name: depositId
in: query
required: false
description: >
The deposit id that is emitted from the FundsDeposited event. This
must be used in conjunction with originChainId. depositTxnRef is not
required when using this parameter.
schema:
type: integer
minimum: 0
examples:
default:
value: 1349975
x-gitbook-description-html: >-
<p>The deposit id that is emitted from the FundsDeposited event.
This must be used in conjunction with originChainId. depositTxnRef
is not required when using this parameter.</p>
- name: depositTxnRef
in: query
required: true
description: >
The deposit transaction hash that is emitted from the FundsDeposited
event. If you are using this, you donot need the other parameters
(i.e. originChainId and depositId).
schema:
type: string
examples:
default:
value: >-
0x56a86610aad2a653161c9dd4b4972f948198fd02ae9589cfac1d57bd86a156c1
x-gitbook-description-html: >-
<p>The deposit transaction hash that is emitted from the
FundsDeposited event. If you are using this, you donot need the
other parameters (i.e. originChainId and depositId).</p>
responses:
'200':
description: Lifecycle of a Transaction
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- filled
- pending
- expired
- refunded
- slowFillRequested
description: |
The status of the deposit.
* filled: Deposits with this status have been filled on the destination chain and the recipient should have received funds. A FilledRelay event was emitted on the destination chain SpokePool.
* pending: Deposit has not been filled yet.
* expired: Deposit has expired and will not be filled. Expired deposits will be refunded to the `depositor` on the `originChainId` in the next batch of repayments.
* refunded: Deposit has expired and the depositor has been successfully refunded on the originChain.
* slowFillRequested: Deposit has been made but no relayer has filled the intent, therefore Across fills the user's intent without requiring a relayer to front the capital.
x-gitbook-description-html: >-
<p>The status of the deposit.</p>
<ul>
<li>filled: Deposits with this status have been filled on
the destination chain and the recipient should have
received funds. A FilledRelay event was emitted on the
destination chain SpokePool.</li>
<li>pending: Deposit has not been filled yet.</li>
<li>expired: Deposit has expired and will not be filled.
Expired deposits will be refunded to the
<code>depositor</code> on the <code>originChainId</code>
in the next batch of repayments.</li>
<li>refunded: Deposit has expired and the depositor has
been successfully refunded on the originChain.</li>
<li>slowFillRequested: Deposit has been made but no
relayer has filled the intent, therefore Across fills the
user's intent without requiring a relayer to front the
capital.</li>
</ul>
fillTxnRef:
type: string
description: >
The transaction hash of the fill transaction on the
destination chain. This field is only present when
`status` is `filled`.
x-gitbook-description-html: >-
<p>The transaction hash of the fill transaction on the
destination chain. This field is only present when
<code>status</code> is <code>filled</code>.</p>
destinationChainId:
type: integer
description: |
The chain id where the fill transaction took place.
x-gitbook-description-html: <p>The chain id where the fill transaction took place.</p>
originChainId:
type: integer
description: >
The chain id where the deposit transaction originally took
place.
x-gitbook-description-html: >-
<p>The chain id where the deposit transaction originally
took place.</p>
depositId:
type: integer
description: |
The deposit Id for the deposit transaction.
x-gitbook-description-html: <p>The deposit Id for the deposit transaction.</p>
depositTxnRef:
type: integer
description: |
The deposit transaction hash.
x-gitbook-description-html: <p>The deposit transaction hash.</p>
depositRefundTxnRef:
type: integer
description: |
The deposit refund transaction hash.
x-gitbook-description-html: <p>The deposit refund transaction hash.</p>
actionsSucceeded:
type: boolean
description: |
Defines if the actions succeeded.
x-gitbook-description-html: <p>Defines if the actions succeeded.</p>
pagination:
type: object
description: >
The pagination object defines the currentIndex and
maxIndex of the returned deposits.
x-gitbook-description-html: >-
<p>The pagination object defines the currentIndex and
maxIndex of the returned deposits.</p>
example:
status: filled
originChainId: 8453
depositId: '4406025'
depositTxnRef: >-
0x0e44727151684ef4cfe7744aad88007cf55b155a64f5f9047fb9d2fa53780967
fillTxnRef: >-
0x0e7b85f1c49c4c89f3b381f12a24d6838be16a41021ab16645bae9dcd1278238
destinationChainId: 137
depositRefundTxnRef: null
actionsSucceeded: null,
pagination:
currentIndex: 0
maxIndex: 0
x-gitbook-description-html: <p>Lifecycle of a Transaction</p>
'400':
description: Invalid input
x-gitbook-description-html: <p>Invalid input</p>
content:
application/json:
example:
type: AcrossApiError
code: INVALID_PARAM
status: 400