Skip to main content
POST
/
trade
/
v1
/
conversions
/
estimate
Estimate conversion
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.

Body

application/json

Conversion request to estimate

reference
string

Client supplied unique identifier for the conversion. This reference can be used to uniquely identify this request. Useful for idempotency and traceability

Example:

"myUniqueRef333"

from
object

From amount

Example:
{ "asset": "USD", "amount": 100 }
to
object

To amount

Example:
{ "asset": "EUR" }
executor
enum<string>

Execution strategy

Available options:
MAKER,
TAKER,
MAKER_TAKER,
MARKET,
TWAP
metadata
object

Client supplied metadata about the request

Example:
{ "customer": "BigBlue", "id": "12345" }
venues
string[]

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

Example:
["kraken", "binance"]
venueAccounts
string[]

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

Example:
["kraken-favorite", "binance-123"]
expiresAt
string<date-time>

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

Example:

"2024-01-01T00:00:00Z"

Response

Conversion estimate calculated successfully

id
string<uuid>
from
object
to
object
legs
object[]
router
enum<string>
Available options:
VWAP,
MARKET,
SINGLE_VENUE_VWAP
result
enum<string>
Available options:
FIRM,
INSUFFICIENT_DEPTH,
INSUFFICIENT_LIQUIDITY
rate
number