Get an accurate estimate of the conversion result including expected output amount, fees, and execution time
curl --request POST \
--url https://api.staging.layer1.com/trade/v1/conversions/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "myUniqueRef333",
"from": {
"asset": "USD",
"amount": 100
},
"to": {
"asset": "EUR"
},
"executor": "MAKER",
"metadata": {
"customer": "BigBlue",
"id": "12345"
},
"venues": [
"kraken",
"binance"
],
"venueAccounts": [
"kraken-favorite",
"binance-123"
],
"expiresAt": "2024-01-01T00:00:00Z"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": {
"asset": "USD",
"amount": 100
},
"to": {
"asset": "USD",
"amount": 100
},
"legs": [
{
"side": "BUY",
"symbol": "<string>",
"quantity": 123,
"price": 123,
"input": 123,
"output": 123,
"orders": [
{
"symbol": "<string>",
"side": "BUY",
"target": {
"quantity": 100.15,
"price": 1.15
},
"venue": "<string>",
"venueAccount": "<string>",
"id": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"venueOrderId": "3f944132-b9d4-4043-a4c6-a9175f39ae32",
"status": "PENDING",
"actual": {
"quantity": 100.15,
"price": 1.15
},
"failureReason": "TOO_SMALL",
"failureMessage": "<string>",
"createdAt": "2024-01-01T00:00:00Z",
"clientOrderId": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"trades": [
{
"symbol": "<string>",
"side": "BUY",
"venueOrderId": "3f944132-b9d4-4043-a4c6-a9175f39ae32",
"clientOrderId": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"underlying": {
"venue": "<string>",
"orderId": "<string>",
"clientId": "<string>",
"tradeId": "<string>"
},
"amount": 100,
"price": 0.891,
"fee": {
"asset": "USD",
"amount": 100
},
"venueTradeId": "5971a88d-384b-4949-9a7c-9c7e9bdba93d",
"id": "e0b89bc6-6e69-40a0-9876-8f83089d63d7",
"timestamp": "2024-01-01T00:00:00Z"
}
]
}
],
"result": "FIRM"
}
],
"router": "VWAP",
"result": "FIRM",
"rate": 123
}Documentation Index
Fetch the complete documentation index at: https://exness-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Conversion request to estimate
Client supplied unique identifier for the conversion. This reference can be used to uniquely identify this request. Useful for idempotency and traceability
"myUniqueRef333"
From amount
Show child attributes
{ "asset": "USD", "amount": 100 }To amount
Show child attributes
{ "asset": "EUR" }Execution strategy
MAKER, TAKER, MAKER_TAKER, MARKET, TWAP Client supplied metadata about the request
Show child attributes
{ "customer": "BigBlue", "id": "12345" }A set of venue identifiers to restrict where the order may be executed. Only the specified venues will be considered for execution. Leave empty or null to allow execution on any available venue
["kraken", "binance"]A set of venue account identifiers where the order may be executed. Only the specified venues will be considered for execution. Leave empty or null to allow execution on any available venue accounts
["kraken-favorite", "binance-123"]Timestamp before which the conversion must be executed. If the conversion is not executed before this time, it will stop processing and marked as expired
"2024-01-01T00:00:00Z"
Conversion estimate calculated successfully
curl --request POST \
--url https://api.staging.layer1.com/trade/v1/conversions/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "myUniqueRef333",
"from": {
"asset": "USD",
"amount": 100
},
"to": {
"asset": "EUR"
},
"executor": "MAKER",
"metadata": {
"customer": "BigBlue",
"id": "12345"
},
"venues": [
"kraken",
"binance"
],
"venueAccounts": [
"kraken-favorite",
"binance-123"
],
"expiresAt": "2024-01-01T00:00:00Z"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": {
"asset": "USD",
"amount": 100
},
"to": {
"asset": "USD",
"amount": 100
},
"legs": [
{
"side": "BUY",
"symbol": "<string>",
"quantity": 123,
"price": 123,
"input": 123,
"output": 123,
"orders": [
{
"symbol": "<string>",
"side": "BUY",
"target": {
"quantity": 100.15,
"price": 1.15
},
"venue": "<string>",
"venueAccount": "<string>",
"id": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"venueOrderId": "3f944132-b9d4-4043-a4c6-a9175f39ae32",
"status": "PENDING",
"actual": {
"quantity": 100.15,
"price": 1.15
},
"failureReason": "TOO_SMALL",
"failureMessage": "<string>",
"createdAt": "2024-01-01T00:00:00Z",
"clientOrderId": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"trades": [
{
"symbol": "<string>",
"side": "BUY",
"venueOrderId": "3f944132-b9d4-4043-a4c6-a9175f39ae32",
"clientOrderId": "2515e05c-3b57-409a-a9b8-ffeb7bfb6040",
"underlying": {
"venue": "<string>",
"orderId": "<string>",
"clientId": "<string>",
"tradeId": "<string>"
},
"amount": 100,
"price": 0.891,
"fee": {
"asset": "USD",
"amount": 100
},
"venueTradeId": "5971a88d-384b-4949-9a7c-9c7e9bdba93d",
"id": "e0b89bc6-6e69-40a0-9876-8f83089d63d7",
"timestamp": "2024-01-01T00:00:00Z"
}
]
}
],
"result": "FIRM"
}
],
"router": "VWAP",
"result": "FIRM",
"rate": 123
}