-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi.yaml
1374 lines (1374 loc) · 48 KB
/
api.yaml
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
components:
schemas:
AssetDecimals:
description: Decimals of an asset.
example: 6
format: int64
maximum: 18446744073709551615
minimum: 0
type: integer
AssetDetails:
description: Asset details.
properties:
asset:
$ref: '#/components/schemas/GYAssetClass'
asset_decimals:
$ref: '#/components/schemas/AssetDecimals'
asset_ticker:
$ref: '#/components/schemas/AssetTicker'
required:
- asset
type: object
AssetTicker:
description: Ticker of an asset.
example: ADA
type: string
BotCancelOrderParameters:
description: Cancel order request parameters specialized towards configured
bot.
properties:
order_references:
items:
$ref: '#/components/schemas/GYTxOutRef'
minItems: 1
type: array
required:
- order_references
type: object
BotFillOrderParameters:
description: Fill order(s) request parameters specialized towards configured
bot.
example:
order_references_with_amount:
- - 0018dbaa1611531b9f11a31765e8abe875f9c43750b82b5f321350f31e1ea747#0
- '100'
- - 0018dbaa1611531b9f11a31765e8abe875f9c43750b82b5f321350f31e144444#0
- '100'
properties:
order_references_with_amount:
items:
items:
- $ref: '#/components/schemas/GYTxOutRef'
- $ref: '#/components/schemas/GYNatural'
maxItems: 2
minItems: 2
type: array
minItems: 1
type: array
required:
- order_references_with_amount
type: object
BotPlaceOrderParameters:
description: Place order request parameters specialized towards configured bot.
properties:
end:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
offer_amount:
$ref: '#/components/schemas/GYNatural'
offer_token:
$ref: '#/components/schemas/GYAssetClass'
price_amount:
$ref: '#/components/schemas/GYNatural'
price_token:
$ref: '#/components/schemas/GYAssetClass'
start:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
required:
- offer_token
- offer_amount
- price_token
- price_amount
type: object
CancelOrderParameters:
description: Cancel order request parameters.
properties:
addresses:
items:
$ref: '#/components/schemas/GYAddressBech32'
minItems: 1
type: array
change_address:
$ref: '#/components/schemas/ChangeAddress'
collateral:
$ref: '#/components/schemas/GYTxOutRef'
order_references:
items:
$ref: '#/components/schemas/GYTxOutRef'
minItems: 1
type: array
required:
- addresses
- order_references
type: object
CancelOrderTransactionDetails:
properties:
transaction:
$ref: '#/components/schemas/GYTx'
transaction_fee:
$ref: '#/components/schemas/GYNatural'
transaction_id:
$ref: '#/components/schemas/GYTxId'
required:
- transaction
- transaction_id
- transaction_fee
type: object
ChangeAddress:
description: An address, serialised as Bech32. This is used as a change address
by our balancer to send left over funds from selected inputs. If not provided,
first address from given addresses list is used instead.
example: addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
format: bech32
type: string
FillOrderParameters:
description: Fill order(s) request parameters.
example:
addresses:
- addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
change_address: addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
collateral: 4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189#1
order_references_with_amount:
- - 0018dbaa1611531b9f11a31765e8abe875f9c43750b82b5f321350f31e1ea747#0
- '100'
- - 0018dbaa1611531b9f11a31765e8abe875f9c43750b82b5f321350f31e144444#0
- '100'
properties:
addresses:
items:
$ref: '#/components/schemas/GYAddressBech32'
minItems: 1
type: array
change_address:
$ref: '#/components/schemas/ChangeAddress'
collateral:
$ref: '#/components/schemas/GYTxOutRef'
order_references_with_amount:
items:
items:
- $ref: '#/components/schemas/GYTxOutRef'
- $ref: '#/components/schemas/GYNatural'
maxItems: 2
minItems: 2
type: array
minItems: 1
type: array
required:
- addresses
- order_references_with_amount
type: object
FillOrderTransactionDetails:
properties:
taker_lovelace_flat_fee:
$ref: '#/components/schemas/GYNatural'
taker_offered_percent_fee:
example: '0.125'
format: float
type: string
taker_offered_percent_fee_amount:
$ref: '#/components/schemas/GYValue'
transaction:
$ref: '#/components/schemas/GYTx'
transaction_fee:
$ref: '#/components/schemas/GYNatural'
transaction_id:
$ref: '#/components/schemas/GYTxId'
required:
- transaction
- transaction_id
- transaction_fee
- taker_lovelace_flat_fee
- taker_offered_percent_fee
- taker_offered_percent_fee_amount
type: object
GYAddressBech32:
description: An address, serialised as Bech32.
example: addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
format: bech32
type: string
GYAssetClass:
description: This is an asset class, i.e. either "lovelace" or some other token
with its minting policy and token name delimited by dot (.).
example: ff80aaaf03a273b8f5c558168dc0e2377eea810badbae6eceefc14ef.474f4c44
type: string
GYBalance:
description: 'A multi asset quantity, represented as map where each key represents
an asset: policy ID and token name in hex concatenated by a dot.'
example:
ff80aaaf03a273b8f5c558168dc0e2377eea810badbae6eceefc14ef.474f4c44: '101'
lovelace: '22'
type: object
GYNatural:
description: A natural number which is a non-negative integer. Minimum value
is 0.
example: '123456789123456789123456789123456789123456789'
type: string
GYPubKeyHash:
description: The hash of a public key.
example: e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d
format: hex
maxLength: 56
minLength: 56
type: string
GYStakeAddressBech32:
description: A stake address, serialised as Bech32.
example: stake_test1upa805fqh85x4hw88zxmhvdaydgyjzmazs9tydqrscerxnghfq4t3
format: bech32
type: string
GYTx:
description: Transaction cbor hex string
example: 84a70082825820975e4c7f8d7937f8102e500714feb3f014c8766fcf287a11c10c686154fcb27501825820c887cba672004607a0f60ab28091d5c24860dbefb92b1a8776272d752846574f000d818258207a67cd033169e330c9ae9b8d0ef8b71de9eb74bbc8f3f6be90446dab7d1e8bfd00018282583900fd040c7a10744b79e5c80ec912a05dbdb3009e372b7f4b0f026d16b0c663651ffc046068455d2994564ba9d4b3e9b458ad8ab5232aebbf401a1abac7d882583900fd040c7a10744b79e5c80ec912a05dbdb3009e372b7f4b0f026d16b0c663651ffc046068455d2994564ba9d4b3e9b458ad8ab5232aebbf40821a0017ad4aa2581ca6bb5fd825455e7c69bdaa9d3a6dda9bcbe9b570bc79bd55fa50889ba1466e69636b656c1911d7581cb17cb47f51d6744ad05fb937a762848ad61674f8aebbaec67be0bb6fa14853696c6c69636f6e190258021a00072f3c0e8009a1581cb17cb47f51d6744ad05fb937a762848ad61674f8aebbaec67be0bb6fa14853696c6c69636f6e1902580b5820291b4e4c5f189cb896674e02e354028915b11889687c53d9cf4c1c710ff5e4aea203815908d45908d101000033332332232332232323232323232323232323232323232323232222223232323235500222222222225335333553024120013232123300122333500522002002001002350012200112330012253350021001102d02c25335325335333573466e3cd400488008d404c880080b40b04ccd5cd19b873500122001350132200102d02c102c3500122002102b102c00a132635335738921115554784f206e6f7420636f6e73756d65640002302115335333573466e3c048d5402c880080ac0a854cd4ccd5cd19b8701335500b2200102b02a10231326353357389210c77726f6e6720616d6f756e740002302113263533573892010b77726f6e6720746f6b656e00023021135500122222222225335330245027007162213500222253350041335502d00200122161353333573466e1cd55cea8012400046644246600200600464646464646464646464646666ae68cdc39aab9d500a480008cccccccccc888888888848cccccccccc00402c02802402001c01801401000c008cd40548c8c8cccd5cd19b8735573aa0049000119910919800801801180f1aba15002301a357426ae8940088c98d4cd5ce01381401301289aab9e5001137540026ae854028cd4054058d5d0a804999aa80c3ae501735742a010666aa030eb9405cd5d0a80399a80a80f1aba15006335015335502101f75a6ae854014c8c8c8cccd5cd19b8735573aa00490001199109198008018011919191999ab9a3370e6aae754009200023322123300100300233502475a6ae854008c094d5d09aba2500223263533573805605805405226aae7940044dd50009aba150023232323333573466e1cd55cea8012400046644246600200600466a048eb4d5d0a80118129aba135744a004464c6a66ae700ac0b00a80a44d55cf280089baa001357426ae8940088c98d4cd5ce01381401301289aab9e5001137540026ae854010cd4055d71aba15003335015335502175c40026ae854008c06cd5d09aba2500223263533573804604804404226ae8940044d5d1280089aba25001135744a00226ae8940044d5d1280089aba25001135744a00226aae7940044dd50009aba150023232323333573466e1d400520062321222230040053016357426aae79400c8cccd5cd19b875002480108c848888c008014c060d5d09aab9e500423333573466e1d400d20022321222230010053014357426aae7940148cccd5cd19b875004480008c848888c00c014dd71aba135573ca00c464c6a66ae7007807c07407006c0680644d55cea80089baa001357426ae8940088c98d4cd5ce00b80c00b00a9100109aab9e5001137540022464460046eb0004c8004d5406488cccd55cf8009280c119a80b98021aba100230033574400402446464646666ae68cdc39aab9d5003480008ccc88848ccc00401000c008c8c8c8cccd5cd19b8735573aa004900011991091980080180118099aba1500233500c012357426ae8940088c98d4cd5ce00b00b80a80a09aab9e5001137540026ae85400cccd5401dd728031aba1500233500875c6ae84d5d1280111931a99ab9c012013011010135744a00226aae7940044dd5000899aa800bae75a224464460046eac004c8004d5405c88c8cccd55cf8011280b919a80b19aa80c18031aab9d5002300535573ca00460086ae8800c0444d5d080089119191999ab9a3370ea0029000119091180100198029aba135573ca00646666ae68cdc3a801240044244002464c6a66ae7004004403c0380344d55cea80089baa001232323333573466e1cd55cea80124000466442466002006004600a6ae854008dd69aba135744a004464c6a66ae7003403803002c4d55cf280089baa0012323333573466e1cd55cea800a400046eb8d5d09aab9e500223263533573801601801401226ea8004488c8c8cccd5cd19b87500148010848880048cccd5cd19b875002480088c84888c00c010c018d5d09aab9e500423333573466e1d400d20002122200223263533573801c01e01a01801601426aae7540044dd50009191999ab9a3370ea0029001100911999ab9a3370ea0049000100911931a99ab9c00a00b009008007135573a6ea80048c8c8c8c8c8cccd5cd19b8750014803084888888800c8cccd5cd19b875002480288488888880108cccd5cd19b875003480208cc8848888888cc004024020dd71aba15005375a6ae84d5d1280291999ab9a3370ea00890031199109111111198010048041bae35742a00e6eb8d5d09aba2500723333573466e1d40152004233221222222233006009008300c35742a0126eb8d5d09aba2500923333573466e1d40192002232122222223007008300d357426aae79402c8cccd5cd19b875007480008c848888888c014020c038d5d09aab9e500c23263533573802402602202001e01c01a01801601426aae7540104d55cf280189aab9e5002135573ca00226ea80048c8c8c8c8cccd5cd19b875001480088ccc888488ccc00401401000cdd69aba15004375a6ae85400cdd69aba135744a00646666ae68cdc3a80124000464244600400660106ae84d55cf280311931a99ab9c00b00c00a009008135573aa00626ae8940044d55cf280089baa001232323333573466e1d400520022321223001003375c6ae84d55cf280191999ab9a3370ea004900011909118010019bae357426aae7940108c98d4cd5ce00400480380300289aab9d5001137540022244464646666ae68cdc39aab9d5002480008cd5403cc018d5d0a80118029aba135744a004464c6a66ae7002002401c0184d55cf280089baa00149924103505431001200132001355008221122253350011350032200122133350052200230040023335530071200100500400132001355007222533500110022213500222330073330080020060010033200135500622225335001100222135002225335333573466e1c005200000d00c13330080070060031333008007335009123330010080030020060031122002122122330010040031122123300100300212200212200111232300100122330033002002001482c0252210853696c6c69636f6e003351223300248920975e4c7f8d7937f8102e500714feb3f014c8766fcf287a11c10c686154fcb27500480088848cc00400c00880050581840100d87980821a001f372a1a358a2b14f5f6
type: string
GYTxId:
description: Transaction id
example: a8d75b90a052302c1232bedd626720966b1697fe38de556c617c340233688935
type: string
GYTxOutRef:
example: 4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189#1
format: hex
pattern: '[0-9a-fA-F]{64}#"d+'
type: string
GYValue:
additionalProperties:
type: integer
description: 'A multi asset quantity, represented as map where each key represents
an asset: policy ID and token name in hex concatenated by a dot.'
example:
ff80aaaf03a273b8f5c558168dc0e2377eea810badbae6eceefc14ef.474f4c44: 101
lovelace: 22
type: object
Market:
description: Market information
properties:
base_asset:
$ref: '#/components/schemas/GYAssetClass'
market_id:
$ref: '#/components/schemas/OrderAssetPair'
target_asset:
$ref: '#/components/schemas/GYAssetClass'
required:
- market_id
- base_asset
- target_asset
type: object
MarketOHLC:
description: Returns market activity in candlestick OHLC format for a specific
DEX and token pair
example:
base_close: 0.207742
base_high: 0.207742
base_low: 0.207742
base_open: 0.207742
base_volume: 25.21128
count: 1
target_close: 4.813658
target_high: 4.813658
target_low: 4.813658
target_open: 4.813658
target_volume: 121.358488
timestamp: 2024-03-07T23:45:00Z
properties:
base_close:
format: double
type: number
base_high:
format: double
type: number
base_low:
format: double
type: number
base_open:
format: double
type: number
base_volume:
format: double
type: number
count:
exclusiveMinimum: false
minimum: 0
type: integer
target_close:
format: double
type: number
target_high:
format: double
type: number
target_low:
format: double
type: number
target_open:
format: double
type: number
target_volume:
format: double
type: number
timestamp:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
required:
- base_close
- base_high
- base_low
- base_open
- base_volume
- target_close
- target_high
- target_low
- target_open
- target_volume
- count
- timestamp
type: object
OrderAssetPair:
description: Market pair identifier. It's an underscore delimited concatenation
of offered and asked asset's "token detail". A token detail is given by dot
delimited concatenation of policy id and token name.
example: f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc535.41474958_dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb.0014df1047454e53
type: string
OrderBookInfo:
properties:
asks:
items:
$ref: '#/components/schemas/OrderInfo'
type: array
bids:
items:
$ref: '#/components/schemas/OrderInfo'
type: array
market_pair_id:
$ref: '#/components/schemas/OrderAssetPair'
timestamp:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
required:
- market_pair_id
- timestamp
- bids
- asks
type: object
OrderInfo:
description: Order details given as part of order-book (bid and ask). Note that
"price_in_datum" is the price given in datum whereas "price" is the rounded
price in terms of currency asset per commodity asset. I.e., for a sell order,
"price" is rounded value of "price_in_datum" whereas for buy order, "price"
is rounded value of reciprocal of "price_in_datum". Likewise, "offer_amount_in_datum"
is the amount given in datum whereas "offer_amount" is the rounded value in
terms of commodity asset.
properties:
end:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
nft_token:
$ref: '#/components/schemas/GYAssetClass'
offer_amount:
example: '0.125'
format: float
type: string
offer_amount_in_datum:
$ref: '#/components/schemas/GYNatural'
output_reference:
$ref: '#/components/schemas/GYTxOutRef'
owner_address:
$ref: '#/components/schemas/GYAddressBech32'
owner_key_hash:
$ref: '#/components/schemas/GYPubKeyHash'
price:
example: '0.125'
format: float
type: string
price_in_datum:
$ref: '#/components/schemas/Rational'
start:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
version:
$ref: '#/components/schemas/POCVersion'
required:
- offer_amount
- offer_amount_in_datum
- price
- price_in_datum
- owner_address
- owner_key_hash
- output_reference
- nft_token
- version
type: object
OrderInfoDetailed:
properties:
asked_asset:
$ref: '#/components/schemas/GYAssetClass'
contained_asked_tokens:
$ref: '#/components/schemas/GYNatural'
end:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
nft_token:
$ref: '#/components/schemas/GYAssetClass'
offer_amount:
$ref: '#/components/schemas/GYNatural'
offer_asset:
$ref: '#/components/schemas/GYAssetClass'
original_offer_amount:
$ref: '#/components/schemas/GYNatural'
output_reference:
$ref: '#/components/schemas/GYTxOutRef'
owner_address:
$ref: '#/components/schemas/GYAddressBech32'
owner_key_hash:
$ref: '#/components/schemas/GYPubKeyHash'
partial_fills:
$ref: '#/components/schemas/GYNatural'
price:
example: '0.125'
format: float
type: string
start:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
required:
- offer_amount
- original_offer_amount
- offer_asset
- asked_asset
- price
- partial_fills
- contained_asked_tokens
- owner_address
- owner_key_hash
- output_reference
- nft_token
type: object
POCVersion:
description: Version of the family of partial order contracts
enum:
- POCVersion1
- POCVersion1_1
example: POCVersion1
type: string
PlaceOrderParameters:
description: Place order request parameters.
properties:
addresses:
items:
$ref: '#/components/schemas/GYAddressBech32'
minItems: 1
type: array
change_address:
$ref: '#/components/schemas/ChangeAddress'
collateral:
$ref: '#/components/schemas/GYTxOutRef'
end:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
offer_amount:
$ref: '#/components/schemas/GYNatural'
offer_token:
$ref: '#/components/schemas/GYAssetClass'
price_amount:
$ref: '#/components/schemas/GYNatural'
price_token:
$ref: '#/components/schemas/GYAssetClass'
stake_address:
$ref: '#/components/schemas/GYStakeAddressBech32'
start:
description: This is the posix time in ISO8601 format.
example: 1970-01-01T00:00:00Z
format: ISO8601
type: string
required:
- addresses
- offer_token
- offer_amount
- price_token
- price_amount
type: object
PlaceOrderTransactionDetails:
properties:
lovelace_deposit:
$ref: '#/components/schemas/GYNatural'
maker_lovelace_flat_fee:
$ref: '#/components/schemas/GYNatural'
maker_offered_percent_fee:
example: '0.125'
format: float
type: string
maker_offered_percent_fee_amount:
$ref: '#/components/schemas/GYNatural'
nft_token:
$ref: '#/components/schemas/GYAssetClass'
order_ref:
$ref: '#/components/schemas/GYTxOutRef'
transaction:
$ref: '#/components/schemas/GYTx'
transaction_fee:
$ref: '#/components/schemas/GYNatural'
transaction_id:
$ref: '#/components/schemas/GYTxId'
required:
- transaction
- transaction_id
- transaction_fee
- maker_lovelace_flat_fee
- maker_offered_percent_fee
- maker_offered_percent_fee_amount
- lovelace_deposit
- order_ref
- nft_token
type: object
PodOrderNotFound:
description: Order not found
enum:
- PodOrderNotFound
type: string
Rational:
properties:
denominator:
type: integer
numerator:
type: integer
required:
- numerator
- denominator
type: object
Settings:
description: Genius Yield Server settings.
properties:
address:
$ref: '#/components/schemas/GYAddressBech32'
backend:
type: string
collateral:
$ref: '#/components/schemas/GYTxOutRef'
network:
type: string
revision:
type: string
stake_address:
$ref: '#/components/schemas/GYStakeAddressBech32'
version:
type: string
required:
- network
- version
- revision
- backend
type: object
TapToolsOHLCV:
description: Get a specific token's trended (open, high, low, close, volume)
price data.
example:
close: 0.15800583264941748
high: 0.15800583264941748
low: 0.15800583264941748
open: 0.15800583264941748
time: 1715007300
volume: 120
properties:
close:
format: double
type: number
high:
format: double
type: number
low:
format: double
type: number
open:
format: double
type: number
time:
multipleOf: 1.0e-12
type: number
volume:
format: double
type: number
required:
- time
- open
- high
- low
- close
- volume
type: object
TradingFees:
description: Trading fees of DEX.
properties:
flat_maker_fee:
$ref: '#/components/schemas/GYNatural'
flat_taker_fee:
$ref: '#/components/schemas/GYNatural'
percentage_maker_fee:
example: '0.125'
format: float
type: string
percentage_taker_fee:
example: '0.125'
format: float
type: string
required:
- flat_maker_fee
- flat_taker_fee
- percentage_maker_fee
- percentage_taker_fee
type: object
securitySchemes:
api-key:
description: API key for accessing the server's API.
in: header
name: api-key
type: apiKey
info:
contact:
email: support@geniusyield.co
name: GeniusYield Technical Support
url: https://www.geniusyield.co/
description: API to interact with GeniusYield DEX.
license:
name: Apache-2.0
url: https://opensource.org/licenses/apache-2-0
title: GeniusYield DEX Server API
version: 0.0.1
openapi: 3.0.0
paths:
/v0/assets/{asset}:
get:
description: Get information for a specific asset. "maestroToken" field in the
configuration is required for this operation.
parameters:
- in: path
name: asset
required: true
schema:
description: This is an asset class, i.e. either "lovelace" or some other
token with its minting policy and token name delimited by dot (.).
example: ff80aaaf03a273b8f5c558168dc0e2377eea810badbae6eceefc14ef.474f4c44
type: string
responses:
'200':
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/AssetDetails'
description: ''
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'404':
description: '`asset` not found'
'500':
description: Internal server error
security:
- api-key: []
summary: Get assets information
tags:
- Assets
/v0/balances/{address}:
get:
description: Get token balances of an address.
parameters:
- in: path
name: address
required: true
schema:
description: An address, serialised as Bech32.
example: addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
format: bech32
type: string
responses:
'200':
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/GYBalance'
description: ''
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'404':
description: '`address` not found'
'500':
description: Internal server error
security:
- api-key: []
summary: Balances
tags:
- Balances
/v0/historical-prices/maestro/{market-id}/{dex}:
get:
description: This endpoint internally calls Maestro's "DEX And Pair OHLC" endpoint.
"maestroToken" field in the configuration is required for this operation.
parameters:
- in: path
name: market-id
required: true
schema:
description: Market pair identifier. It's an underscore delimited concatenation
of offered and asked asset's "token detail". A token detail is given by
dot delimited concatenation of policy id and token name.
example: f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc535.41474958_dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb.0014df1047454e53
type: string
- in: path
name: dex
required: true
schema:
description: DEX to fetch data from
enum:
- minswap
- genius-yield
example: genius-yield
type: string
- in: query
name: resolution
required: false
schema:
description: Resolution of the data
enum:
- 1m
- 5m
- 15m
- 30m
- 1h
- 4h
- 1d
- 1w
- 1mo
example: 1m
type: string
- in: query
name: from
required: false
schema:
format: date
type: string
- in: query
name: to
required: false
schema:
format: date
type: string
- in: query
name: limit
required: false
schema:
example: 1
maximum: 50000
minimum: 1
type: integer
- in: query
name: sort
required: false
schema:
description: Order of the results
enum:
- asc
- desc
example: asc
type: string
responses:
'200':
content:
application/json;charset=utf-8:
schema:
items:
$ref: '#/components/schemas/MarketOHLC'
type: array
description: ''
'400':
description: Invalid `sort` or `limit` or `to` or `from` or `resolution`
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'404':
description: '`market-id` or `dex` not found'
'500':
description: Internal server error
security:
- api-key: []
summary: Get price history using Maestro.
tags:
- Historical Prices
/v0/historical-prices/tap-tools/{asset}:
get:
description: This endpoint internally calls TapTools's "Token price OHLCV" endpoint.
Note that only the liquidity pools involving ADA and the given asset class
is considered to get for aggregated price information. Price returned is in
ADA.
parameters:
- in: path
name: asset
required: true
schema:
description: This is an asset class, i.e. either "lovelace" or some other
token with its minting policy and token name delimited by dot (.).
example: ff80aaaf03a273b8f5c558168dc0e2377eea810badbae6eceefc14ef.474f4c44
type: string
- in: query
name: interval
required: true
schema:
description: The time interval
enum:
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 12h
- 1d
- 3d
- 1w
- 1M
example: 1M
type: string
- in: query
name: numIntervals
required: false
schema:
description: The number of intervals to return, e.g. if you want 180 days
of data in 1d intervals, then pass 180 here.
exclusiveMinimum: false
minimum: 0
type: integer
responses:
'200':
content:
application/json;charset=utf-8:
schema:
items:
$ref: '#/components/schemas/TapToolsOHLCV'
type: array
description: ''
'400':
description: Invalid `numIntervals` or `interval`
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'404':
description: '`asset` not found'
'500':
description: Internal server error
security:
- api-key: []
summary: Get price history using TapTools.
tags:
- Historical Prices
/v0/markets:
get:
description: Returns the list of markets information supported by GeniusYield
DEX. "maestroToken" field in the configuration is required for this operation.
responses:
'200':
content:
application/json;charset=utf-8:
schema:
items:
$ref: '#/components/schemas/Market'
type: array
description: ''
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'500':
description: Internal server error
security:
- api-key: []
summary: Get markets information for the DEX.
tags:
- Markets
/v0/order-books/{market-id}:
get:
description: Get order book for a specific market.
parameters:
- in: path
name: market-id
required: true
schema:
description: Market pair identifier. It's an underscore delimited concatenation
of offered and asked asset's "token detail". A token detail is given by
dot delimited concatenation of policy id and token name.
example: f43a62fdc3965df486de8a0d32fe800963589c41b38946602a0dc535.41474958_dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb.0014df1047454e53
type: string
- in: query
name: address
required: false
schema:
description: An address, serialised as Bech32.
example: addr_test1qrsuhwqdhz0zjgnf46unas27h93amfghddnff8lpc2n28rgmjv8f77ka0zshfgssqr5cnl64zdnde5f8q2xt923e7ctqu49mg5
format: bech32
type: string
responses:
'200':
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/OrderBookInfo'
description: ''
'400':
description: Invalid `address`
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'404':
description: '`market-id` not found'
'500':
description: Internal server error
security:
- api-key: []
summary: Order book
tags:
- Order Book
/v0/orders:
delete:
description: Cancel order(s). This endpoint would also sign & submit the built
transaction. It uses the signing key from configuration to compute for wallet
address. If collateral is specified in the configuration, then it would be
used for.
requestBody:
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/BotCancelOrderParameters'
responses:
'200':
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/CancelOrderTransactionDetails'
description: ''
'400':
description: Invalid `body`
'401':
description: Unauthorized access - API key missing
'403':
description: Forbidden - The API key does not have permission to perform
the request
'500':
description: Internal server error
security:
- api-key: []
summary: Cancel order(s)
tags:
- Orders
post:
description: Create an order. This endpoint would also sign & submit the built
transaction. It uses the signing key from configuration to compute for wallet
address. If collateral is specified in the configuration, then it would be
used for. "stakeAddress" field from configuration, if provided, is used to
place order at a mangled address.
requestBody:
content:
application/json;charset=utf-8:
schema:
$ref: '#/components/schemas/BotPlaceOrderParameters'
responses:
'200':
content:
application/json;charset=utf-8: