curl --request GET \
--url https://mainnet.gomaestro-api.org/v1/contracts/directSwap/getOffers \
--header 'api-key: <api-key>'
[
{
"outRef": {
"tx_hash": "<string>",
"output_index": 123
},
"datum": {
"creator": {
"paymentCredential": [
"<string>"
],
"stakeCredential": [
[
"<string>"
]
]
},
"toBuy": {
"policyId1": {
"assetName1": "123"
},
"policyId2": {
"assetName2": "456"
},
"policyId3": {
"assetName3": "789"
}
}
},
"assets": {
"policyId1assetName1": "123",
"policyId2assetName2": "456",
"policyId3assetName3": "789"
}
}
]
Get all the existing offers for direct swap
curl --request GET \
--url https://mainnet.gomaestro-api.org/v1/contracts/directSwap/getOffers \
--header 'api-key: <api-key>'
[
{
"outRef": {
"tx_hash": "<string>",
"output_index": 123
},
"datum": {
"creator": {
"paymentCredential": [
"<string>"
],
"stakeCredential": [
[
"<string>"
]
]
},
"toBuy": {
"policyId1": {
"assetName1": "123"
},
"policyId2": {
"assetName2": "456"
},
"policyId3": {
"assetName3": "789"
}
}
},
"assets": {
"policyId1assetName1": "123",
"policyId2assetName2": "456",
"policyId3assetName3": "789"
}
}
]
Project API Key
Offers retrieved successfully
The response is of type object[]
.