Creating quote

Create quote

POST /api/public/v1/exchange/quotes

This endpoint creates quotes.

Headers

Body

Request JSON

{
  "data": {
    "type": "quotes",
    "attributes": {
      "accountChargedId": string,
      "accountReceivedId": string,
      "amount": number,
      "amountCurrency": string
    }
  }
}

Response

{
  "data": {
    "id": "0592492e-0088-446c-98fa-7149c8734939",
    "type": "exchangeQuotes",
    "attributes": {
      "expiresAt": "2024-07-01T14:12:08.475Z",
      "amountCharged": "59.47",
      "amountReceived": "0.001",
      "rate": "58880.0",
      "exchangeFee": "0.59",
      "exchangeFeeCurrency": "EUR",
      "rateCurrency": "EUR",
      "amountChargedCurrency": "EUR",
      "amountReceivedCurrency": "BTC"
    },
    "relationships": {
      "exchangeOrder": {
        "data": {
          "type": "orders",
          "id": "58530d58-6ffd-4b6b-a6bf-204c9dd056bc"
        }
      }
    }
  },
  "included": [
    {
      "id": "58530d58-6ffd-4b6b-a6bf-204c9dd056bc",
      "type": "orders",
      "attributes": {
        "baseCode": "EUR",
        "quoteCode": "BTC",
        "quantity": "59.47"
      }
    }
  ],
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}

Response Body

Last updated