API reference · Trading

Create a quote

POST/v1/quotes

A firm price for a buy or sell, valid for a few seconds (expires_at says when) and accepted at most once with POST /v1/trades. Give exactly one of base_amount and quote_amount. Refused with trading_halted for a short while after a fast price move.

Scope
trade
Rate-limit class
quote
Authentication
Signed
Idempotency-Key
Optional

Parameters

  • Idempotency-Keystringheaderoptional

    1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.

    Matches ^[A-Za-z0-9_-]{1,64}$.

Request body

application/json · CreateQuoteRequest. Unknown fields are rejected.

  • assetstringrequired

    An upper-case asset symbol.

    Matches ^[A-Z0-9]{1,15}$. Example: BTC.

  • sidestring (enum)required

    One of buy, sell.

  • base_amountstring (decimal)optional

    Amount of the asset. Give this or quote_amount.

  • quote_amountstring (decimal)optional

    Amount of USDC. Give this or base_amount.

Responses

201 Created

The quote. application/json · Quote

  • idstring

    Starts with qt_.

  • assetstring

    An upper-case asset symbol.

    Matches ^[A-Z0-9]{1,15}$.

  • sidestring (enum)

    One of buy, sell.

  • quote_currency"USDC"
  • base_amountstring (decimal)
  • quote_amountstring (decimal)
  • pricestring (decimal)
  • isk_estimatestring (decimal)nullable

    Indicative.

  • statusstring (enum)

    One of open, accepted, expired, filled, failed.

  • created_atstring (date-time)
  • expires_atstring (date-time)
  • trade_idstringnullable

    Starts with tr_.

Every response carries MK-Request-Id, plus RateLimit-Policy and RateLimit.

Errors

Errors use the error envelope. Match on code.

StatusCodeMeaning
400invalid_requestThe request is malformed: bad JSON, an unknown or invalid field, or a missing header.
401invalid_signatureThe MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.
401key_expiredThe key has passed its expiry date.
401key_revokedThe key was revoked.
401timestamp_out_of_rangeMK-Timestamp is more than 30 seconds from the server clock.
401nonce_reusedThis key already used this MK-Nonce.
403ip_not_allowedThe request came from an address outside the key's IP allowlist.
403insufficient_scopeThe key doesn't have the scope this endpoint needs.
403account_restrictedThe account can't use the API right now (for example locked, inactive, or onboarding not finished).
403api_access_disabledAPI access is switched off.
409idempotency_conflictThis Idempotency-Key was used with a different request body.
409idempotency_in_progressA request with this Idempotency-Key is still being processed.
413payload_too_largeThe request body is larger than 8 KB.
415unsupported_media_typeRequest bodies must be application/json.
422insufficient_fundsThe available balance doesn't cover the trade, gift card or withdrawal.
422amount_below_minimumThe amount is below the minimum.
422amount_above_maximumThe amount is above the maximum.
422asset_not_tradableThe asset can't be traded right now.
422limit_exceededA daily or 30-day limit would be exceeded.
429rate_limitedToo many requests. Wait for Retry-After seconds.
429too_many_concurrent_requestsToo many requests in flight for this key or account.
429key_suspendedThe key is suspended, for example after sustained rate limiting.
500internal_errorSomething went wrong on our side.
502bad_gatewayAn upstream service answered unexpectedly.
503overloadedThe service is overloaded. Retry after Retry-After seconds.
503service_unavailableThe service is temporarily unavailable.
503maintenanceThe API is read-only for maintenance.
503trading_haltedTrading is paused: switched off, or paused for this asset for a short while after a fast price move.
504gateway_timeoutAn upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.

Request

# Signed by sign-headers.sh: see Authentication
body='{"asset":"BTC","side":"buy","quote_amount":"100.00"}'
curl https://public-api.myntkaup.is/v1/quotes \
  -H "Content-Type: application/json" \
  $(./sign-headers.sh POST /v1/quotes "$body" | sed 's/^/-H /') \
  --data "$body"
import { Myntkaup } from "@myntkaup/api";

const client = new Myntkaup(); // reads the key from the environment
const quote = await client.quotes.create({ asset: "BTC", side: "buy", quoteAmount: "100.00" });
console.log(quote.id, quote.base_amount, quote.expires_at);
from myntkaup import Myntkaup

client = Myntkaup()  # reads the key from the environment
quote = client.quotes.create(asset="BTC", side="buy", quote_amount="100.00")
print(quote["id"], quote["base_amount"], quote["expires_at"])

Response

201 Created
{
  "id": "qt_01JB8X2Q4M7Z3V9K5T1N6R0P2W",
  "asset": "BTC",
  "side": "buy",
  "quote_currency": "USDC",
  "base_amount": "0.00104210",
  "quote_amount": "100.00",
  "price": "95960.12",
  "isk_estimate": "13421",
  "status": "open",
  "created_at": "2026-11-03T10:15:10Z",
  "expires_at": "2026-11-03T10:15:20Z",
  "trade_id": null
}

Base URL https://public-api.myntkaup.is