-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger-dev.yml
2973 lines (2964 loc) · 116 KB
/
swagger-dev.yml
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: Skip API
description: Simple APIs to build IBC-enabled products that do more with fewer transactions.
For devs with all levels of IBC experience.
version: 0.1.0
servers:
- url: https://solve-dev.skip.money
tags:
- name: Info
description: APIs that return general information useful for a variety of operations
- name: Fungible
description: APIs swaps, transfers, and contract calls within the IBC/Cosmos Ecosystem,
EVM ecosystem, and between them, including automatic DEX aggregation, bridge routing,
and denom recommendation. Typical usage is /route to generate routing info and
quotes, followed by /msgs to generate msgs for signing
- name: Transaction
description: APIs for broadcasting transactions within the IBC/Cosmos ecosystem,
EVM ecosystem, and between them, and tracking their status and any subsequent
transfers if routing assets cross chain. Typical usage is /submit to broadcast
a transaction, followed by /status to query its status
paths:
/v1/info/chains:
get:
operationId: getChains
tags:
- Info
description: Get all supported chains along with additional data useful for
building applications + frontends that interface with them (e.g. logo URI,
IBC capabilities, fee assets, bech32 prefix, etc...)
parameters:
- in: query
name: include_evm
required: false
schema:
type: boolean
description: Whether to include EVM chains in the response
example: false
- in: query
name: include_testnets
required: false
schema:
type: boolean
description: Whether to include testnets in the response
example: false
- in: query
name: client_id
required: false
schema:
type: string
description: Recognizable identifier for callers (e.g. skip-api-docs, best-wallet,
etc...)
example: skip-api-docs
responses:
'200':
description: Returns a list of supported chains with additional data
content:
application/json:
example:
chains:
- chain_name: cosmoshub
chain_id: cosmoshub-4
pfm_enabled: true
cosmos_module_support:
authz: true
feegrant: true
supports_memo: true
logo_uri: https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png
bech32_prefix: cosmos
fee_assets:
- denom: uatom
gas_price:
low: '0.01'
average: '0.025'
high: '0.03'
chain_type: cosmos
ibc_capabilities:
cosmos_pfm: true
cosmos_ibc_hooks: true
cosmos_memo: true
cosmos_autopilot: true
- chain_name: osmosis
chain_id: osmosis-1
pfm_enabled: true
cosmos_module_support:
authz: true
feegrant: true
supports_memo: true
bech32_prefix: osmo
logo_uri: https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/osmosis-chain-logo.png
fee_assets:
- denom: uosmo
gas_price:
low: '0.0025'
average: '0.025'
high: '0.04'
chain_type: cosmos
ibc_capabilities:
cosmos_pfm: true
cosmos_ibc_hooks: true
cosmos_memo: true
cosmos_autopilot: true
schema:
type: object
properties:
chains:
type: array
items:
$ref: '#/components/schemas/Chain'
description: Array of supported chain-ids
/v2/info/bridges:
get:
operationId: getBridges
tags:
- Info
description: Get all supported bridges
parameters:
- in: query
name: client_id
required: false
schema:
type: string
description: Recognizable identifier for callers (e.g. skip-api-docs, best-wallet,
etc...)
example: skip-api-docs
responses:
'200':
description: A list of supported bridges
content:
application/json:
example:
bridges:
- id: IBC
name: IBC
logo_uri: https://raw.githubusercontent.com/skip-mev/skip-api-registry/main/bridges/ibc/logo.svg
- id: AXELAR
name: Axelar
logo_uri: https://raw.githubusercontent.com/skip-mev/skip-api-registry/main/bridges/axelar/logo.svg
- id: CCTP
name: CCTP
logo_uri: https://raw.githubusercontent.com/skip-mev/skip-api-registry/main/bridges/cctp/logo.svg
schema:
type: object
properties:
bridges:
type: array
items:
$ref: '#/components/schemas/Bridge'
description: Array of supported bridges
/v1/fungible/venues:
get:
operationId: getVenues
tags:
- Fungible
description: Get supported swap venues.
responses:
'200':
description: A list of supported swap venues
content:
application/json:
example:
venues:
- name: neutron-astroport
chain_id: neutron-1
client_id: skip-api-docs
- name: osmosis
chain_id: osmosis-1
client_id: skip-api-docs
schema:
type: object
properties:
venues:
type: array
items:
$ref: '#/components/schemas/SwapVenue'
description: Array of supported swap venues
/v1/fungible/assets:
get:
operationId: getAssets
tags:
- Fungible
description: Get supported assets. Optionally limit to assets on a given chain
and/or native assets.
parameters:
- in: query
name: chain_id
required: false
schema:
type: string
description: Chain-id to get supported assets for
examples:
osmosis:
value: osmosis-1
summary: Get assets on osmosis-1
all:
value: null
summary: Get assets across all chains
- in: query
name: native_only
required: false
schema:
type: boolean
description: Whether to restrict assets to those native to their chain
examples:
true:
value: true
summary: Get only native assets
false:
value: false
summary: Get all assets
- in: query
name: include_no_metadata_assets
required: false
schema:
type: boolean
description: Whether to include assets without metadata (symbol, name, logo_uri,
etc.)
examples:
false:
value: false
summary: Exclude assets without metadata
true:
value: true
summary: Include assets without metadata
- in: query
name: include_cw20_assets
required: false
schema:
type: boolean
description: Whether to include CW20 tokens
examples:
false:
value: false
summary: Exclude CW20 tokens
true:
value: true
summary: Include CW20 tokens
- in: query
name: include_evm_assets
required: false
schema:
type: boolean
description: Whether to include EVM tokens
examples:
false:
value: false
summary: Exclude EVM tokens
true:
value: true
summary: Include EVM tokens
- in: query
name: client_id
required: false
schema:
type: string
description: Recognizable identifier for callers (e.g. skip-api-docs, best-wallet,
etc...)
examples:
skip-api-docs:
value: skip-api-docs
summary: Identifier for this docs page
responses:
'200':
description: A map of chain_id to assets
content:
application/json:
example:
chain_to_assets_map:
osmosis-1:
assets:
- denom: uosmo
chain_id: osmosis-1
origin_denom: uosmo
origin_chain_id: osmosis-1
trace: ''
symbol: OSMO
name: OSMO
logo_uri: https://raw.githubusercontent.com/cosmostation/chainlist/main/chain/osmosis/asset/osmo.png
decimals: 6
coingecko_id: osmosis
description: The native token of Osmosis
recommended_symbol: OSMO
schema:
type: object
properties:
chain_to_assets_map:
type: object
description: Map of chain-ids to array of assets supported on
the chain
additionalProperties:
type: object
properties:
assets:
type: array
items:
$ref: '#/components/schemas/Asset'
'400':
description: The request was invalid, e.g. field is invalid
content:
application/json:
example:
code: 3
message: Invalid chain_id
details: []
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
example:
code: 2
message: internal server error
details: []
schema:
$ref: '#/components/schemas/Error'
/v1/fungible/assets_from_source:
post:
operationId: getAssetsFromSource
tags:
- Fungible
description: Get assets that can be reached from a source via transfers under
different conditions (e.g. single vs multiple txs)
requestBody:
required: true
content:
application/json:
examples:
uusdc_from_axelar:
value:
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
allow_multi_tx: false
client_id: skip-api-docs
summary: Get transfer assets that can be reached from USDC on Axelar
astro_from_terra:
value:
source_asset_denom: cw20:terra1nsuqsk6kh58ulczatwev87ttq2z6r3pusulg9r24mfj2fvtzd4uq3exn26
source_asset_chain_id: phoenix-1
allow_multi_tx: false
client_id: skip-api-docs
summary: Get transfer assets that can be reached from ASTRO on Terra
schema:
type: object
required:
- source_asset_denom
- source_asset_chain_id
properties:
source_asset_denom:
type: string
description: Denom of the source asset
source_asset_chain_id:
type: string
description: Chain-id of the source asset
allow_multi_tx:
type: boolean
description: Whether to include recommendations requiring multiple
transactions to reach the destination
default: false
include_cw20_assets:
type: boolean
description: Whether to include CW20 tokens
default: false
client_id:
type: string
description: Recognizable identifier for callers (e.g. skip-api-docs,
best-wallet, etc...)
responses:
'200':
description: Assets reachable from the specified source without swapping
content:
application/json:
example:
dest_assets:
agoric-3:
assets:
- denom: ibc/295548A78785A1007F232DE286149A6FF512F180AF5657780FC89C009E2C348F
chain_id: agoric-3
origin_denom: uusdc
origin_chain_id: axelar-dojo-1
trace: transfer/channel-9
comdex-1:
assets:
- denom: ibc/E1616E7C19EA474C565737709A628D6F8A23FF9D3E9A7A6871306CF5E0A5341E
chain_id: comdex-1
origin_denom: uusdc
origin_chain_id: axelar-dojo-1
trace: transfer/channel-34
symbol: axlUSDC
name: axlUSDC
logo_uri: https://raw.githubusercontent.com/cosmostation/chainlist/main/chain/ethereum/asset/usdc.png
decimals: 6
recommended_symbol: USDC.axl
schema:
type: object
properties:
dest_assets:
type: object
description: Array of assets that are reachable from the specified
source asset
additionalProperties:
type: object
properties:
assets:
type: array
items:
$ref: '#/components/schemas/Asset'
'400':
description: The request was invalid, e.g. field is invalid
content:
application/json:
example:
code: 3
message: Invalid source_asset_denom
details: []
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
example:
code: 2
message: internal server error
details: []
schema:
$ref: '#/components/schemas/Error'
/v2/fungible/route:
post:
operationId: getRouteV2
tags:
- Fungible
description: This supports cross-chain actions among EVM chains, Cosmos chains,
and between them. Returns the sequence of transfers and/or swaps to reach
the given destination asset from the given source asset, along with estimated
amount out. Commonly called before /msgs to generate route info and quote.
requestBody:
required: true
content:
application/json:
examples:
swap_usdc_to_atom:
value:
amount_in: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
dest_asset_denom: uatom
dest_asset_chain_id: cosmoshub-4
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Swap 1 USDC on Axelar to ATOM on the Hub
swap_astro_to_luna:
value:
amount_in: '1000000'
source_asset_denom: cw20:terra1nsuqsk6kh58ulczatwev87ttq2z6r3pusulg9r24mfj2fvtzd4uq3exn26
source_asset_chain_id: phoenix-1
dest_asset_denom: uluna
dest_asset_chain_id: phoenix-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Swap 1 ASTRO on Terra to LUNA on Terra
transfer_statom_from_osomosis_to_hub:
value:
amount_in: '1000000'
source_asset_denom: ibc/C140AFD542AE77BD7DCC83F13FDD8C5E5BB8C4929785E6EC2F4C636F98F17901
source_asset_chain_id: osmosis-1
dest_asset_denom: ibc/B05539B66B72E2739B986B86391E5D08F12B8D5D2C2A7F8F8CF9ADF674DFA231
dest_asset_chain_id: cosmoshub-4
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Transfer 1 stATOM from Osmosis to the Hub
transfer_matic_to_osmosis:
value:
amount_in: '3000000000000000000'
source_asset_denom: polygon-native
source_asset_chain_id: '137'
dest_asset_denom: ibc/AB589511ED0DD5FA56171A39978AFBF1371DB986EC1C3526CE138A16377E39BB
dest_asset_chain_id: osmosis-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Transfer 3 MATIC from Polygon to Osmosis
transfer_usdc_in_from_noble_to_osmosis:
value:
amount_in: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4
dest_asset_chain_id: osmosis-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Transfer 1 USDC in from Noble to Osmosis
transfer_usdc_from_noble_to_eth_via_cctp:
value:
amount_in: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
dest_asset_chain_id: '1'
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
experimental_features:
- CCTP
bridges:
- CCTP
summary: Transfer 1 USDC from Noble to Ethereum via CCTP
receive_usdc_out_from_noble_on_osmosis:
value:
amount_out: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4
dest_asset_chain_id: osmosis-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Receive 1 USDC from Noble on Osmosis
swap_usdc_in_from_noble_to_osmosis:
value:
amount_in: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: uosmo
dest_asset_chain_id: osmosis-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Swap 1 USDC in from Noble to OSMO on Osmosis
swap_usdc_out_from_noble_to_osmosis:
value:
amount_out: '1000000'
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: uosmo
dest_asset_chain_id: osmosis-1
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Receive 1 OSMO on Osmosis from USDC on Noble
swap_usdc_out_from_osmosis_to_cosmoshub:
value:
amount_out: '1000000'
source_asset_denom: uosmo
source_asset_chain_id: osmosis-1
dest_asset_denom: ibc/F663521BF1836B00F5F177680F74BFB9A8B5654A694D0D2BC249E03CF2509013
dest_asset_chain_id: cosmoshub-4
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
summary: Receive 1 Noble USDC on Cosmos Hub from OSMO on Osmosis
swap_with_allow_unsafe_false:
value:
amount_in: '100000000000000'
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
dest_asset_denom: uatom
dest_asset_chain_id: cosmoshub-4
cumulative_affiliate_fee_bps: '0'
allow_multi_tx: true
client_id: skip-api-docs
allow_unsafe: false
summary: High price impact swap with allow_unsafe=false
experimental_features:
value:
amount_in: '100000000000000'
source_asset_denom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
source_asset_chain_id: '1'
dest_asset_denom: uusdc
dest_asset_chain_id: noble-1
cumulative_affiliate_fee_bps: '0'
client_id: skip-api-docs
allow_unsafe: false
allow_multi_tx: true
experimental_features:
- CCTP
summary: Experimental features request
schema:
type: object
properties:
amount_in:
type: string
description: Amount of source asset to be transferred or swapped.
Only one of amount_in and amount_out should be provided.
amount_out:
type: string
description: Amount of destination asset to receive. Only one of
amount_in and amount_out should be provided. If amount_out is
provided for a swap, the route will be computed to give exactly
amount_out.
source_asset_denom:
type: string
description: Denom of the source asset
source_asset_chain_id:
type: string
description: Chain-id of the source asset
dest_asset_denom:
type: string
description: Denom of the destination asset
dest_asset_chain_id:
type: string
description: Chain-id of the destination asset
cumulative_affiliate_fee_bps:
type: string
nullable: true
description: Cumulative fee to be distributed to affiliates, in
bps (optional)
swap_venue:
description: Swap venue to use, if provided (optional)
allOf:
- $ref: '#/components/schemas/SwapVenue'
client_id:
type: string
description: Recognizable identifier for callers (e.g. skip-api-docs,
best-wallet, etc...)
allow_multi_tx:
type: boolean
description: Whether to allow route responses requiring multiple
transactions
allow_unsafe:
type: boolean
description: Toggles whether the api should return routes that fail
price safety checks.
experimental_features:
type: array
description: Array of experimental features to enable
items:
type: string
bridges:
type: array
description: Array of bridges to use
items:
$ref: '#/components/schemas/BridgeType'
responses:
'200':
description: Swap and transfer route summary & quote
content:
application/json:
example:
amount_in: '1000000000000000000'
amount_out: '721110'
source_asset_denom: polygon-native
source_asset_chain_id: '137'
dest_asset_denom: uosmo
dest_asset_chain_id: osmosis-1
operations:
- axelar_transfer:
from_chain: Polygon
from_chain_id: '137'
to_chain: osmosis
to_chain_id: osmosis-1
asset: wmatic-wei
should_unwrap: false
fee_amount: '335901477747718412'
usd_fee_amount: '0.27'
fee_asset:
denom: matic
chain_id: '137'
origin_denom: ''
origin_chain_id: ''
trace: ''
is_cw20: false
is_evm: true
symbol: MATIC
name: matic
logo_uri: https://raw.githubusercontent.com/cosmostation/chainlist/main/chain/polygon/asset/wmatic.png
decimals: 18
token_contract: ''
is_testnet: false
bridge_id: AXELAR
- swap:
swap_in:
swap_venue:
name: osmosis-poolmanager
chain_id: osmosis-1
swap_operations:
- pool: '789'
denom_in: ibc/AB589511ED0DD5FA56171A39978AFBF1371DB986EC1C3526CE138A16377E39BB
denom_out: uosmo
swap_amount_in: '664098522252281588'
price_impact_percent: '1.05'
estimated_affiliate_fee: 0uosmo
chain_ids:
- axelar-dojo-1
- osmosis-1
- cosmoshub-4
does_swap: true
estimated_amount_out: '721110'
swap_venue:
name: osmosis-poolmanager
chain_id: osmosis-1
txs_required: 1
usd_amount_in: '2000.01'
usd_amount_out: '2005.23'
swap_price_impact_percent: '1.05'
schema:
$ref: '#/components/schemas/RouteResponse'
'400':
description: The request was invalid, e.g. an invalid amount was passed
or the swap size is unsafe
content:
application/json:
example:
code: 3
message: 'difference in usd value of route input and output is too
large. input usd value: 100000.00 output usd value: 98811.81'
details:
- '@type': type.googleapis.com/google.rpc.ErrorInfo
reason: BAD_PRICE_ERROR
domain: skip.money
metadata: {}
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
example:
code: 2
message: internal server error
details: []
schema:
$ref: '#/components/schemas/Error'
/v2/fungible/msgs:
post:
operationId: getMsgsV2
tags:
- Fungible
description: This supports cross-chain actions among EVM chains, Cosmos chains,
and between them. Returns minimal number of messages required to execute a
multi-chain swap or transfer. Input consists of the output of route with additional
information required for message construction (e.g. destination addresses
for each chain)
requestBody:
required: true
content:
application/json:
examples:
swap_usdc_to_atom:
value:
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
dest_asset_denom: uatom
dest_asset_chain_id: cosmoshub-4
amount_in: '1000000'
amount_out: '107033'
address_list:
- axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0
- osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu
- cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw
operations:
- transfer:
port: transfer
channel: channel-3
from_chain_id: axelar-dojo-1
to_chain_id: osmosis-1
pfm_enabled: false
dest_denom: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
- swap:
swap_in:
swap_venue:
name: osmosis-poolmanager
chain_id: osmosis-1
swap_operations:
- pool: '678'
denom_in: ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858
denom_out: uosmo
- pool: '1'
denom_in: uosmo
denom_out: ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2
swap_amount_in: '1000000'
estimated_affiliate_fee: 0ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2
- transfer:
port: transfer
channel: channel-0
from_chain_id: osmosis-1
to_chain_id: cosmoshub-4
pfm_enabled: true
dest_denom: uatom
slippage_tolerance_percent: '1'
affiliates: []
client_id: skip-api-docs
summary: Swap 1 USDC on Axelar to ATOM on the Hub
transfer_matic_to_osmosis:
value:
source_asset_denom: polygon-native
source_asset_chain_id: '137'
dest_asset_denom: ibc/AB589511ED0DD5FA56171A39978AFBF1371DB986EC1C3526CE138A16377E39BB
dest_asset_chain_id: osmosis-1
amount_in: '3000000000000000000'
amount_out: '1509000000000000000'
operations:
- axelar_transfer:
from_chain: Polygon
from_chain_id: '137'
to_chain: osmosis
to_chain_id: osmosis-1
asset: polygon-native
should_unwrap: false
is_testnet: false
affiliates: []
address_list:
- '0x00b40F326Ab76189170cA2FfeCfa4B34b43949dA'
- osmo1tsmt8ezjrp7w0mls5p4rv8gcaz4yx5lzqyww8m
summary: Transfer 3 MATIC from Polygon to Osmosis
cctp_transfer_noble_to_ethereum:
value:
source_asset_denom: uusdc
source_asset_chain_id: noble-1
dest_asset_denom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
dest_asset_chain_id: '1'
amount_in: '1000000'
amount_out: '1000000'
operations:
- cctp_transfer:
from_chain_id: noble-1
to_chain_id: '1'
burn_token: uusdc
affiliates: []
address_list:
- noble13vjmklxq8nkdmv2a0w5m887t38jz9na30vl8g6
- '0x8EB49E3D65d74967CC0Fe987FA2d015ae816352E'
summary: Transfer 1 USDC from Noble to Ethereum via CCTP
schema:
type: object
properties:
source_asset_denom:
type: string
description: Denom of the source asset
source_asset_chain_id:
type: string
description: Chain-id of the source asset
dest_asset_denom:
type: string
description: Denom of the destination asset
dest_asset_chain_id:
type: string
description: Chain-id of the destination asset
amount_in:
type: string
description: Amount of source asset to be transferred or swapped
amount_out:
type: string
description: Amount of destination asset out
address_list:
type: array
description: Array of receipient and/or sender address for each
chain in the path, corresponding to the chain_ids array returned
from a route request
items:
type: string
operations:
type: array
description: Array of operations required to perform the transfer
or swap
items:
$ref: '#/components/schemas/Operation'
slippage_tolerance_percent:
type: string
description: Percent tolerance for slippage on swap, if a swap is
performed
timeout_seconds:
type: string
description: Number of seconds for the IBC transfer timeout, defaults
to 5 minutes
post_route_handler:
$ref: '#/components/schemas/PostHandler'
affiliates:
type: array
description: Array of affiliates to send affiliate fees
items:
$ref: '#/components/schemas/Affiliate'
responses:
'200':
description: The messages required to execute the swap, as JSON.
content:
application/json:
example:
msgs:
- multi_chain_msg:
chain_id: axelar-dojo-1
path:
- axelar-dojo-1
msg: '{"source_port":"transfer","source_channel":"channel-3","token":{"denom":"uusdc","amount":"1000000"},"sender":"axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0","receiver":"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler","timeout_height":{},"timeout_timestamp":1688663426558649000,"memo":"{\"wasm\":{\"contract\":\"osmo1qpvu80yfd0jnnh3ytn8964382typrqq0ejmqaasa3j233su8apasfqtler\",\"msg\":{\"swap_with_action\":{\"swap_msg\":{\"token_out_min_amount\":\"105963\",\"path\":[{\"pool_id\":\"678\",\"token_out_denom\":\"uosmo\"},{\"pool_id\":\"1\",\"token_out_denom\":\"ibc/27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2\"}]},\"after_swap_action\":{\"ibc_transfer\":{\"receiver\":\"cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw\",\"channel\":\"channel-0\"}},\"local_fallback_address\":\"osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu\"}}}}"}'
msg_type_url: /ibc.applications.transfer.v1.MsgTransfer
schema:
type: object
properties:
msgs:
type: array
items:
$ref: '#/components/schemas/Msg'
'400':
description: The request was invalid, e.g. an invalid amount was passed.
content:
application/json:
example:
code: 3
message: invalid amount_in
details: []
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
example:
code: 2
message: internal server error
details: []
schema:
$ref: '#/components/schemas/Error'
/v2/fungible/msgs_direct:
post:
operationId: getMsgsDirectV2
tags:
- Fungible
description: This supports cross-chain actions among EVM chains, Cosmos chains,
and between them. Returns minimal number of messages required to execute a
multi-chain swap or transfer. This is a convenience endpoint that combines
/route and /msgs into a single call.
requestBody:
required: true
content:
application/json:
examples:
swap_usdc_to_atom:
value:
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
dest_asset_denom: uatom
dest_asset_chain_id: cosmoshub-4
amount_in: '1000000'
chain_ids_to_addresses:
axelar-dojo-1: axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0
osmosis-1: osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu
cosmoshub-4: cosmos1x8ad0zyw52mvndh7hlnafrg0gt284ga7cl43fw
slippage_tolerance_percent: '3'
allow_multi_tx: true
client_id: skip-api-docs
summary: Swap 1 USDC on Axelar to ATOM on the Hub
swap_astro_to_luna:
value:
source_asset_denom: cw20:terra1nsuqsk6kh58ulczatwev87ttq2z6r3pusulg9r24mfj2fvtzd4uq3exn26
source_asset_chain_id: phoenix-1
dest_asset_denom: uluna
dest_asset_chain_id: phoenix-1
amount_in: '1000000'
chain_ids_to_addresses:
phoenix-1: terra127qzje4r06q3lgeh6dm2tvsuzc3l2uu4q3ezlz
slippage_tolerance_percent: '3'
allow_multi_tx: true
client_id: skip-api-docs
summary: Swap 1 ASTRO on Terra to LUNA on Terra
transfer_matic_to_osmosis:
value:
amount_in: '3000000000000000000'
source_asset_denom: polygon-native
source_asset_chain_id: '137'
dest_asset_denom: ibc/AB589511ED0DD5FA56171A39978AFBF1371DB986EC1C3526CE138A16377E39BB
dest_asset_chain_id: osmosis-1
client_id: skip-api-docs
chain_ids_to_addresses:
137: '0x00b40F326Ab76189170cA2FfeCfa4B34b43949dA'
osmosis-1: osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu
slippage_tolerance_percent: '3'
allow_multi_tx: true
summary: Transfer 3 MATIC from Polygon to Osmosis
transfer_usdc_from_eth_to_noble_via_cctp:
value:
amount_in: '100'
source_asset_denom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
source_asset_chain_id: '1'
dest_asset_denom: uusdc
dest_asset_chain_id: noble-1
client_id: skip-api-docs
chain_ids_to_addresses:
1: '0x00b40F326Ab76189170cA2FfeCfa4B34b43949dA'
noble-1: noble1x8ad0zyw52mvndh7hlnafrg0gt284ga7suqe3q
slippage_tolerance_percent: '3'
allow_multi_tx: true
experimental_features:
- CCTP
bridges:
- CCTP
summary: Transfer USDC from Ethereum to Noble via CCTP
swap_with_allow_unsafe_false:
value:
source_asset_denom: uusdc
source_asset_chain_id: axelar-dojo-1
dest_asset_denom: uatom
dest_asset_chain_id: cosmoshub-4
amount_in: '100000000000000'
chain_ids_to_addresses:
axelar-dojo-1: axelar1x8ad0zyw52mvndh7hlnafrg0gt284ga7u3rez0
osmosis-1: osmo1x8ad0zyw52mvndh7hlnafrg0gt284ga7syxplu