{
  "openapi": "3.1.0",
  "info": {
    "title": "Myntkaup Public API",
    "version": "1.0.0",
    "description": "Programmatic access to a Myntkaup account: market data, balances, history, quotes and trades, gift cards, and bank and crypto withdrawals.\n\n## Authentication\n\nCreate a key in the webapp under **Settings → API keys**. You get a key id (`mk_live_…`, or `mk_test_…` on staging) and a private key (`mk_sk_…`, base64url of an Ed25519 seed). Myntkaup stores only the public key.\n\nEvery request except `GET /v1/status` carries four headers:\n\n| Header | Value |\n|---|---|\n| `MK-Key-Id` | the key id |\n| `MK-Timestamp` | milliseconds since the epoch, within 30 s of the server clock (see `server_time` in `GET /v1/status`) |\n| `MK-Nonce` | 32 lowercase hex characters (16 random bytes), never reused |\n| `MK-Signature` | standard base64 of the Ed25519 signature of the canonical string |\n\n```\ncanonical = \"myntkaup-public-v1\\n\" + key_id + \"\\n\" + timestamp + \"\\n\" + nonce + \"\\n\"\n          + METHOD + \"\\n\" + path_and_query + \"\\n\" + sha256_hex(raw_body)\n```\n\n`path_and_query` is exactly as sent, e.g. `/v1/transactions?limit=10&asset=BTC`. Sign the exact body bytes you send; an empty body hashes as `sha256(\"\")`. Request bodies are `application/json`, at most 8 KB.\n\n## Scopes\n\n- `account:read`: GET /v1/me details, /v1/balances, /v1/limits and /v1/bank-accounts.\n- `transactions:read`: GET /v1/transactions, /v1/trades, /v1/withdrawals and /v1/giftcards (without codes).\n- `trade`: POST /v1/quotes, GET /v1/quotes/{id} and POST /v1/trades.\n- `giftcards:create`: POST /v1/giftcards, gift card codes and PDFs.\n- `withdrawals:create`: POST /v1/withdrawals/bank and /v1/withdrawals/crypto, and GET /v1/bank-accounts. Crypto withdrawals must be confirmed from the account's email.\n\n`GET /v1/me`, `/v1/assets` and `/v1/prices` work with any valid key.\n\n## Rate limits\n\nToken buckets per key and per account, by endpoint class. Every signed response has `RateLimit-Policy` and `RateLimit` headers; a 429 has `Retry-After`. At most 5 requests may be in flight per key and 10 per account. A key that is rate limited on most of its requests for 10 minutes is suspended for 15 minutes.\n\n| Class | Per key | Per account |\n|---|---|---|\n| market | 10/s (burst 20) | 20/s |\n| read | 5/s (burst 10) | 10/s |\n| quote | 1/s, 30/min | 60/min |\n| trade | 10/min | 10/min, 500/day |\n| giftcard | 5/hour | 5/hour |\n| withdrawal | 10/hour | 10/hour, 20/day |\n\n## Conventions\n\n- Amounts are decimal strings, asset symbols are upper case, times are ISO 8601 UTC.\n- Lists take `limit` (1 to 100, default 50) and `cursor`, and return `{ \"data\": [...], \"next_cursor\": \"...\" | null }`.\n- `Idempotency-Key` is required on `POST /v1/trades`, `POST /v1/giftcards` and the `POST /v1/withdrawals/*` endpoints, and optional on `POST /v1/quotes`. It is kept for 24 hours; the same key with another body is a 409.\n- Errors are `{ \"error\": { \"code\", \"message\", \"request_id\" } }`. Match on `code`, never on `message`.\n- Unknown request fields are rejected. New response fields may be added within v1, so ignore fields you don't know.\n",
    "contact": {
      "name": "Myntkaup",
      "url": "https://myntkaup.is"
    }
  },
  "servers": [
    {
      "url": "https://public-api.myntkaup.is",
      "description": "Production (mk_live_ keys)"
    },
    {
      "url": "https://public-api.staging.myntkaup.is",
      "description": "Staging (mk_test_ keys)"
    }
  ],
  "tags": [
    {
      "name": "Status"
    },
    {
      "name": "Account"
    },
    {
      "name": "Market data"
    },
    {
      "name": "Trading"
    },
    {
      "name": "History"
    },
    {
      "name": "Gift cards"
    },
    {
      "name": "Withdrawals"
    },
    {
      "name": "Keys"
    }
  ],
  "security": [
    {
      "MkKeyId": [],
      "MkTimestamp": [],
      "MkNonce": [],
      "MkSignature": []
    }
  ],
  "paths": {
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Service status",
        "tags": [
          "Status"
        ],
        "description": "Whether the API is up and whether trading and gift cards are enabled, plus the server clock. No signature needed. Cached for up to 30 s.\n\nNo signature.",
        "security": [],
        "responses": {
          "200": {
            "description": "The status.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "none"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "summary": "The account and this key",
        "tags": [
          "Account"
        ],
        "description": "Account type, display name and tier, and this key's id, name, scopes, IP allowlist and expiry.\n\nAny valid key. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The account and key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "any",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/assets": {
      "get": {
        "operationId": "listAssets",
        "summary": "Tradable assets",
        "tags": [
          "Market data"
        ],
        "description": "Every listed asset with its trade sizes and precision. Cached for up to 30 s.\n\nAny valid key. Rate limit class: `market`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The assets.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "any",
        "x-myntkaup-rate-limit-class": "market"
      }
    },
    "/v1/prices": {
      "get": {
        "operationId": "listPrices",
        "summary": "Prices at your tier",
        "tags": [
          "Market data"
        ],
        "description": "Buy and sell prices of every asset at the key's account tier, in USDC. Cached for up to 1 s.\n\nAny valid key. Rate limit class: `market`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The prices.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "any",
        "x-myntkaup-rate-limit-class": "market"
      }
    },
    "/v1/prices/{asset}": {
      "get": {
        "operationId": "getPrice",
        "summary": "One asset's price",
        "tags": [
          "Market data"
        ],
        "description": "Any valid key. Rate limit class: `market`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "asset",
            "in": "path",
            "required": true,
            "description": "An upper-case asset symbol.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,15}$",
              "examples": [
                "BTC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The price.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Price"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "any",
        "x-myntkaup-rate-limit-class": "market"
      }
    },
    "/v1/balances": {
      "get": {
        "operationId": "getBalances",
        "summary": "Balances",
        "tags": [
          "Account"
        ],
        "description": "Per asset: available, held and total, with indicative USDC and ISK values. USDC is always listed.\n\nScope: `account:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The balances.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balances"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "account:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/limits": {
      "get": {
        "operationId": "getLimits",
        "summary": "Limits and usage",
        "tags": [
          "Account"
        ],
        "description": "Trade limits and today's use (UTC day, public API trades only), gift card quotas (every channel), and this key's rate limits.\n\nScope: `account:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The limits.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Limits"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "account:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/quotes": {
      "post": {
        "operationId": "createQuote",
        "summary": "Create a quote",
        "tags": [
          "Trading"
        ],
        "description": "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.\n\nScope: `trade`. Rate limit class: `quote`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            },
            "required": false
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The quote.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_conflict`: This Idempotency-Key was used with a different request body.\n\n`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`insufficient_funds`: The available balance doesn't cover the trade, gift card or withdrawal.\n\n`amount_below_minimum`: The amount is below the minimum.\n\n`amount_above_maximum`: The amount is above the maximum.\n\n`asset_not_tradable`: The asset can't be traded right now.\n\n`limit_exceeded`: A daily or 30-day limit would be exceeded.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.\n\n`maintenance`: The API is read-only for maintenance.\n\n`trading_halted`: Trading is paused: switched off, or paused for this asset for a short while after a fast price move.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "trade",
        "x-myntkaup-rate-limit-class": "quote"
      }
    },
    "/v1/quotes/{id}": {
      "get": {
        "operationId": "getQuote",
        "summary": "Get a quote",
        "tags": [
          "Trading"
        ],
        "description": "Scope: `trade`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^qt_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "qt_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "trade",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/trades": {
      "post": {
        "operationId": "createTrade",
        "summary": "Accept a quote",
        "tags": [
          "Trading"
        ],
        "description": "Executes an open quote. Returns 201 when filled, or 202 while the trade is still pending; poll GET /v1/trades/{id}. Refused with price_moved when the market has moved against the quote by more than the account's tolerance. Idempotency-Key is required: on a timeout, retry with the same key.\n\nScope: `trade`. Rate limit class: `trade`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The trade, filled or failed.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trade"
                }
              }
            }
          },
          "202": {
            "description": "The trade, still pending.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trade"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_conflict`: This Idempotency-Key was used with a different request body.\n\n`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.\n\n`quote_already_used`: The quote was already accepted.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`quote_expired`: The quote has expired.\n\n`price_moved`: The market moved too far from the quoted price.\n\n`insufficient_funds`: The available balance doesn't cover the trade, gift card or withdrawal.\n\n`limit_exceeded`: A daily or 30-day limit would be exceeded.\n\n`asset_not_tradable`: The asset can't be traded right now.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.\n\n`maintenance`: The API is read-only for maintenance.\n\n`trading_halted`: Trading is paused: switched off, or paused for this asset for a short while after a fast price move.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "trade",
        "x-myntkaup-rate-limit-class": "trade"
      },
      "get": {
        "operationId": "listTrades",
        "summary": "List trades",
        "tags": [
          "History"
        ],
        "description": "Trades from every channel, newest first. from and to may be at most 366 days apart.\n\nScope: `transactions:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "required": false,
            "description": "An upper-case asset symbol.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,15}$",
              "examples": [
                "BTC"
              ]
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "buy",
                "sell"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~=+/-]{1,512}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of trades.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "transactions:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/trades/{id}": {
      "get": {
        "operationId": "getTrade",
        "summary": "Get a trade",
        "tags": [
          "History"
        ],
        "description": "Scope: `transactions:read` or `trade`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^tr_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "tr_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The trade.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trade"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": [
          "transactions:read",
          "trade"
        ],
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/transactions": {
      "get": {
        "operationId": "listTransactions",
        "summary": "List ledger entries",
        "tags": [
          "History"
        ],
        "description": "Every balance change, newest first. from and to may be at most 366 days apart.\n\nScope: `transactions:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "required": false,
            "description": "An upper-case asset symbol.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,15}$",
              "examples": [
                "BTC"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "trade",
                "deposit",
                "withdrawal",
                "fee",
                "gift",
                "giftcode",
                "referral_bonus",
                "loan",
                "hold",
                "other"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Label language. Default en.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "is"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~=+/-]{1,512}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of ledger entries.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "transactions:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/transactions/{id}": {
      "get": {
        "operationId": "getTransaction",
        "summary": "Get a ledger entry",
        "tags": [
          "History"
        ],
        "description": "Scope: `transactions:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^tx_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "tx_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Label language. Default en.",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "is"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ledger entry.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "transactions:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/giftcards": {
      "post": {
        "operationId": "createGiftcard",
        "summary": "Create a gift card",
        "tags": [
          "Gift cards"
        ],
        "description": "Debits the amount and returns a single-use code. Idempotency-Key is required.\n\nScope: `giftcards:create`. Rate limit class: `giftcard`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGiftcardRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The gift card, with its code.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Giftcard"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_conflict`: This Idempotency-Key was used with a different request body.\n\n`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`insufficient_funds`: The available balance doesn't cover the trade, gift card or withdrawal.\n\n`amount_below_minimum`: The amount is below the minimum.\n\n`amount_above_maximum`: The amount is above the maximum.\n\n`limit_exceeded`: A daily or 30-day limit would be exceeded.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.\n\n`maintenance`: The API is read-only for maintenance.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "giftcards:create",
        "x-myntkaup-rate-limit-class": "giftcard"
      },
      "get": {
        "operationId": "listGiftcards",
        "summary": "List gift cards",
        "tags": [
          "Gift cards"
        ],
        "description": "Gift cards made by the account. code is included only for keys with giftcards:create.\n\nScope: `transactions:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "unredeemed",
                "redeemed"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~=+/-]{1,512}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of gift cards.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftcardList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "transactions:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/giftcards/{id}": {
      "get": {
        "operationId": "getGiftcard",
        "summary": "Get a gift card",
        "tags": [
          "Gift cards"
        ],
        "description": "code is included only for keys with giftcards:create.\n\nScope: `transactions:read`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gc_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "gc_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The gift card.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Giftcard"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "transactions:read",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/giftcards/{id}/pdf": {
      "get": {
        "operationId": "getGiftcardPdf",
        "summary": "Gift card PDF",
        "tags": [
          "Gift cards"
        ],
        "description": "Scope: `giftcards:create`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^gc_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "gc_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The printable gift card.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "giftcards:create",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/bank-accounts": {
      "get": {
        "operationId": "listBankAccounts",
        "summary": "Saved bank accounts",
        "tags": [
          "Withdrawals"
        ],
        "description": "The bank accounts the account has withdrawn to before, most recently used first. A bank withdrawal can go to one of these or to a new account.\n\nScope: `account:read` or `withdrawals:create`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The saved bank accounts.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BankAccountList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": [
          "account:read",
          "withdrawals:create"
        ],
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/withdrawals/bank": {
      "post": {
        "operationId": "createBankWithdrawal",
        "summary": "Withdraw to a bank account",
        "tags": [
          "Withdrawals"
        ],
        "description": "Moves the amount of USDC to hold and queues a payout to an Icelandic bank account in the account holder's own name: a saved one or a new one. Myntkaup pays it out on a business day, in krónur or, to an Arion foreign-currency account, in US dollars; follow it with GET /v1/withdrawals/{id}. Idempotency-Key is required.\n\nScope: `withdrawals:create`. Rate limit class: `withdrawal`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBankWithdrawalRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The withdrawal, pending.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.\n\n`forbidden`: This action is switched off for the API right now.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_conflict`: This Idempotency-Key was used with a different request body.\n\n`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`insufficient_funds`: The available balance doesn't cover the trade, gift card or withdrawal.\n\n`amount_below_minimum`: The amount is below the minimum.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.\n\n`maintenance`: The API is read-only for maintenance.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "withdrawals:create",
        "x-myntkaup-rate-limit-class": "withdrawal"
      }
    },
    "/v1/withdrawals/crypto": {
      "post": {
        "operationId": "createCryptoWithdrawal",
        "summary": "Withdraw crypto",
        "tags": [
          "Withdrawals"
        ],
        "description": "Requests a withdrawal to a crypto address and emails a confirmation link to the account's email address. Nothing is sent, or held, until that link is opened, within 30 minutes. Idempotency-Key is required.\n\nScope: `withdrawals:create`. Rate limit class: `withdrawal`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "1 to 64 characters of [A-Za-z0-9_-]. Kept for 24 h; reuse it to retry safely.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,64}$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCryptoWithdrawalRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The withdrawal, awaiting email confirmation.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.\n\n`forbidden`: This action is switched off for the API right now.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_conflict`: This Idempotency-Key was used with a different request body.\n\n`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`insufficient_funds`: The available balance doesn't cover the trade, gift card or withdrawal.\n\n`amount_below_minimum`: The amount is below the minimum.\n\n`asset_not_withdrawable`: The asset can't be withdrawn on this network right now.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.\n\n`maintenance`: The API is read-only for maintenance.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "withdrawals:create",
        "x-myntkaup-rate-limit-class": "withdrawal"
      }
    },
    "/v1/withdrawals": {
      "get": {
        "operationId": "listWithdrawals",
        "summary": "List withdrawals",
        "tags": [
          "Withdrawals"
        ],
        "description": "Bank and crypto withdrawals from every channel, newest first. from and to may be at most 366 days apart.\n\nScope: `transactions:read` or `withdrawals:create`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "bank",
                "crypto"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "awaiting_confirmation: a crypto withdrawal waiting for the link in the confirmation email; expired: that link was not used in time; pending: being processed; completed: sent; canceled; failed.",
            "schema": {
              "type": "string",
              "enum": [
                "awaiting_confirmation",
                "expired",
                "pending",
                "completed",
                "canceled",
                "failed"
              ]
            }
          },
          {
            "name": "asset",
            "in": "query",
            "required": false,
            "description": "An upper-case asset symbol.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z0-9]{1,15}$",
              "examples": [
                "BTC"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Default 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._~=+/-]{1,512}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of withdrawals.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawalList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": [
          "transactions:read",
          "withdrawals:create"
        ],
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/withdrawals/{id}": {
      "get": {
        "operationId": "getWithdrawal",
        "summary": "Get a withdrawal",
        "tags": [
          "Withdrawals"
        ],
        "description": "Scope: `transactions:read` or `withdrawals:create`. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^wd_[A-Za-z0-9_-]{1,64}$",
              "examples": [
                "wd_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The withdrawal.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.\n\n`insufficient_scope`: The key doesn't have the scope this endpoint needs.\n\n`account_restricted`: The account can't use the API right now (for example locked, inactive, or onboarding not finished).\n\n`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": [
          "transactions:read",
          "withdrawals:create"
        ],
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/me/key/revoke": {
      "post": {
        "operationId": "revokeKey",
        "summary": "Revoke this key",
        "tags": [
          "Keys"
        ],
        "description": "Revokes the key the request is signed with, at once and for good, as revoking it in Settings → API would. Any valid key can revoke itself: for a script that is done with its key, or a command-line tool logging out. The account holder gets the usual email.\n\nAny valid key. Rate limit class: `read`.",
        "security": [
          {
            "MkKeyId": [],
            "MkTimestamp": [],
            "MkNonce": [],
            "MkSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The key, now revoked.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedKey"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_signature`: The MK-* headers are missing or malformed, the key id is unknown, or the signature doesn't match.\n\n`key_expired`: The key has passed its expiry date.\n\n`key_revoked`: The key was revoked.\n\n`timestamp_out_of_range`: MK-Timestamp is more than 30 seconds from the server clock.\n\n`nonce_reused`: This key already used this MK-Nonce.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The request came from an address outside the key's IP allowlist.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.\n\n`too_many_concurrent_requests`: Too many requests in flight for this key or account.\n\n`key_suspended`: The key is suspended, for example after sustained rate limiting.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "`bad_gateway`: An upstream service answered unexpectedly.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.\n\n`service_unavailable`: The service is temporarily unavailable.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "`gateway_timeout`: An upstream service didn't answer in time. A POST may still complete; retry with the same Idempotency-Key.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "any",
        "x-myntkaup-rate-limit-class": "read"
      }
    },
    "/v1/key-pairings/claim": {
      "post": {
        "operationId": "claimKeyPairing",
        "summary": "Claim a key with a connect code",
        "tags": [
          "Keys"
        ],
        "description": "Creates a key from a one-time code made in Settings → API (Connect the CLI), with the public key of a key pair the caller made itself, so the private key never leaves the caller. The name, scopes, IP allowlist and expiry were chosen in Settings, after an electronic ID check. No signature needed: the code is the credential, used once, and valid for 10 minutes. Unknown, used and expired codes all answer not_found. Limited to 10 attempts an hour per IP address.\n\nNo signature.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimKeyPairingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new key, and its account.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is malformed: bad JSON, an unknown or invalid field, or a missing header.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`api_access_disabled`: API access is switched off.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No such resource.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "`payload_too_large`: The request body is larger than 8 KB.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "`unsupported_media_type`: Request bodies must be application/json.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`key_limit_reached`: The account already has as many API keys as it can (5): revoke one in Settings → API first.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Wait for Retry-After seconds.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: Something went wrong on our side.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "`overloaded`: The service is overloaded. Retry after Retry-After seconds.",
            "headers": {
              "MK-Request-Id": {
                "$ref": "#/components/headers/MK-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-myntkaup-scope": "none"
      }
    }
  },
  "components": {
    "schemas": {
      "Asset": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "live",
              "delisted"
            ],
            "description": "A delisted coin can still be sold."
          },
          "buy_enabled": {
            "type": "boolean"
          },
          "sell_enabled": {
            "type": "boolean"
          },
          "base_increment": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "price_decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "min_trade_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "max_trade_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "asset",
          "name",
          "status",
          "buy_enabled",
          "sell_enabled",
          "base_increment",
          "price_decimals",
          "min_trade_usdc",
          "max_trade_usdc",
          "logo_url"
        ]
      },
      "AssetList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Balance": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "available": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "held": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "holds + limit order holds + loan collateral holds.",
            "examples": [
              "0.00104210"
            ]
          },
          "total": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "value_usdc": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                "description": "A decimal number as a string.",
                "examples": [
                  "0.00104210"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Indicative."
          },
          "value_isk": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                "description": "A decimal number as a string.",
                "examples": [
                  "0.00104210"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Indicative."
          }
        },
        "required": [
          "asset",
          "available",
          "held",
          "total",
          "value_usdc",
          "value_isk"
        ]
      },
      "Balances": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "total_value_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "total_value_isk": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Balance"
            }
          }
        },
        "required": [
          "as_of",
          "total_value_usdc",
          "total_value_isk",
          "data"
        ]
      },
      "BankAccount": {
        "type": "object",
        "properties": {
          "account_number": {
            "type": "string",
            "examples": [
              "0133-26-012345"
            ]
          },
          "payout_currency": {
            "type": "string",
            "enum": [
              "ISK",
              "FOREIGN"
            ],
            "description": "How Myntkaup pays out to this account; nothing to choose. ISK: in krónur at Arion's rate. FOREIGN: an Arion foreign-currency account (ledger 38), in US dollars."
          },
          "added_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "account_number",
          "payout_currency",
          "added_at",
          "last_used_at"
        ]
      },
      "BankAccountList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankAccount"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "ClaimKeyPairingRequest": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^mkp_[a-z2-7]{26}$",
            "description": "The one-time code Settings → API shows after Connect the CLI. Valid for 10 minutes.",
            "examples": [
              "mkp_abcdefghijklmnopqrstuvwxyz"
            ]
          },
          "public_key": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "description": "The new key's Ed25519 public key: the 32 bytes, base64url without padding.",
            "examples": [
              "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"
            ]
          },
          "client": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$",
                "examples": [
                  "myntkaup-cli"
                ]
              },
              "version": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$",
                "examples": [
                  "0.2.0"
                ]
              },
              "hostname": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
              },
              "os": {
                "examples": [
                  "darwin"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
              }
            },
            "required": [
              "name",
              "version"
            ],
            "additionalProperties": false,
            "description": "What is claiming the key, shown to the account holder in Settings → API."
          }
        },
        "required": [
          "code",
          "public_key",
          "client"
        ],
        "additionalProperties": false
      },
      "CreateBankWithdrawalRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
            "description": "USDC taken from the balance, fee included, with at most 2 decimals. Bank withdrawals are always from USDC; Myntkaup pays out in krónur, or in US dollars to an Arion foreign-currency account.",
            "examples": [
              "250.00"
            ]
          },
          "bank_account": {
            "type": "string",
            "pattern": "^(\\d{4}-\\d{2}-\\d{6}|\\d{12})$",
            "description": "A saved account from GET /v1/bank-accounts, or a new one. It must be in the account holder's own name (kennitala). A foreign-currency account (ledger 38) must be at Arion (03xx-38-…).",
            "examples": [
              "0133-26-012345"
            ]
          }
        },
        "required": [
          "amount",
          "bank_account"
        ],
        "additionalProperties": false
      },
      "CreateCryptoWithdrawalRequest": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "network": {
            "description": "Needed only for an asset on several networks: USDC is ethereum (the default) or solana.",
            "examples": [
              "ethereum"
            ],
            "type": "string",
            "pattern": "^[a-z0-9-]{1,40}$"
          },
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
            "description": "The amount taken from the balance, fee included.",
            "examples": [
              "0.01"
            ]
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9:._-]+$",
            "examples": [
              "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
            ]
          },
          "memo": {
            "description": "Required for XRP (destination tag) and HBAR (memo).",
            "type": "string",
            "pattern": "^\\d{1,20}$"
          },
          "travel_rule": {
            "$ref": "#/components/schemas/TravelRule"
          }
        },
        "required": [
          "asset",
          "amount",
          "address",
          "travel_rule"
        ],
        "additionalProperties": false
      },
      "CreateGiftcardRequest": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
            "description": "A positive decimal number as a string.",
            "examples": [
              "100.00"
            ]
          },
          "recipient_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
          }
        },
        "required": [
          "asset",
          "amount"
        ],
        "additionalProperties": false
      },
      "CreateQuoteRequest": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "base_amount": {
            "description": "Amount of the asset. Give this or quote_amount.",
            "examples": [
              "0.001"
            ],
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$"
          },
          "quote_amount": {
            "description": "Amount of USDC. Give this or base_amount.",
            "type": "string",
            "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
            "examples": [
              "100.00"
            ]
          }
        },
        "required": [
          "asset",
          "side"
        ],
        "additionalProperties": false,
        "description": "Exactly one of base_amount and quote_amount."
      },
      "CreateTradeRequest": {
        "type": "object",
        "properties": {
          "quote_id": {
            "type": "string",
            "pattern": "^qt_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "qt_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          }
        },
        "required": [
          "quote_id"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable, machine-readable error code.",
                "examples": [
                  "quote_expired"
                ]
              },
              "message": {
                "type": "string",
                "description": "A human-readable explanation. Don't parse it."
              },
              "request_id": {
                "type": "string",
                "description": "The MK-Request-Id of the request.",
                "examples": [
                  "req_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
                ]
              }
            },
            "required": [
              "code",
              "message",
              "request_id"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Giftcard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^gc_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "gc_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          },
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "recipient_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "unredeemed",
              "redeemed"
            ]
          },
          "code": {
            "description": "Only for keys that also have giftcards:create. Treat it like cash.",
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "public_api",
              "app",
              "web"
            ],
            "description": "Where the record was made: this API, the mobile app or the webapp."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "redeemed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "asset",
          "amount",
          "recipient_name",
          "status",
          "source",
          "created_at",
          "redeemed_at"
        ]
      },
      "GiftcardLimits": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "max_per_card_eur": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "per_day": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "used_today": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "per_30_days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "used_30_days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "value_30_days_eur": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "value_used_30_days_eur": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          }
        },
        "required": [
          "enabled",
          "max_per_card_eur",
          "per_day",
          "used_today",
          "per_30_days",
          "used_30_days",
          "value_30_days_eur",
          "value_used_30_days_eur"
        ]
      },
      "GiftcardList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Giftcard"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as cursor for the next page; null at the end."
          }
        },
        "required": [
          "data",
          "next_cursor"
        ]
      },
      "Limits": {
        "type": "object",
        "properties": {
          "trade": {
            "$ref": "#/components/schemas/TradeLimits"
          },
          "giftcards": {
            "$ref": "#/components/schemas/GiftcardLimits"
          },
          "rate_limits": {
            "$ref": "#/components/schemas/RateLimits"
          }
        },
        "required": [
          "trade",
          "giftcards",
          "rate_limits"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "person",
                  "company"
                ]
              },
              "name": {
                "type": "string"
              },
              "tier": {
                "type": "string",
                "pattern": "^tier-\\d{1,3}$",
                "description": "The account's fee tier.",
                "examples": [
                  "tier-1"
                ]
              }
            },
            "required": [
              "type",
              "name",
              "tier"
            ]
          },
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^mk_(live|test)_[a-z0-9]{20}$",
                "examples": [
                  "mk_live_4f9c2a7d1e0b8c6a5d3f"
                ]
              },
              "name": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "account:read",
                    "transactions:read",
                    "trade",
                    "giftcards:create",
                    "withdrawals:create"
                  ]
                }
              },
              "ip_allowlist": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "examples": [
                      "2026-11-03T10:15:10Z"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "null for a key without expiry."
              }
            },
            "required": [
              "id",
              "name",
              "scopes",
              "ip_allowlist",
              "created_at",
              "expires_at"
            ]
          }
        },
        "required": [
          "account",
          "key"
        ]
      },
      "Price": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "quote_currency": {
            "type": "string",
            "const": "USDC"
          },
          "buy": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "sell": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          }
        },
        "required": [
          "asset",
          "quote_currency",
          "buy",
          "sell",
          "updated_at"
        ]
      },
      "PriceList": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "string",
            "pattern": "^tier-\\d{1,3}$",
            "description": "The account's fee tier.",
            "examples": [
              "tier-1"
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          }
        },
        "required": [
          "tier",
          "as_of",
          "data"
        ]
      },
      "Quote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^qt_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "qt_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          },
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "quote_currency": {
            "type": "string",
            "const": "USDC"
          },
          "base_amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "quote_amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "price": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "isk_estimate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                "description": "A decimal number as a string.",
                "examples": [
                  "0.00104210"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Indicative."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "accepted",
              "expired",
              "filled",
              "failed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "trade_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^tr_[A-Za-z0-9_-]{1,64}$",
                "examples": [
                  "tr_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "asset",
          "side",
          "quote_currency",
          "base_amount",
          "quote_amount",
          "price",
          "isk_estimate",
          "status",
          "created_at",
          "expires_at",
          "trade_id"
        ]
      },
      "RateLimits": {
        "type": "object",
        "properties": {
          "classes": {
            "type": "object",
            "properties": {
              "market": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              },
              "read": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              },
              "quote": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              },
              "trade": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              },
              "giftcard": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              },
              "withdrawal": {
                "type": "object",
                "properties": {
                  "per_key": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  },
                  "per_account": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "Tokens added per interval."
                        },
                        "interval_seconds": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "burst": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991,
                          "description": "The most requests that can be made at once."
                        }
                      },
                      "required": [
                        "limit",
                        "interval_seconds",
                        "burst"
                      ]
                    }
                  }
                },
                "required": [
                  "per_key",
                  "per_account"
                ]
              }
            },
            "required": [
              "market",
              "read",
              "quote",
              "trade",
              "giftcard",
              "withdrawal"
            ]
          },
          "concurrency": {
            "type": "object",
            "properties": {
              "per_key": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "per_account": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "per_key",
              "per_account"
            ]
          }
        },
        "required": [
          "classes",
          "concurrency"
        ]
      },
      "RevokedKey": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^mk_(live|test)_[a-z0-9]{20}$",
                "examples": [
                  "mk_live_4f9c2a7d1e0b8c6a5d3f"
                ]
              },
              "status": {
                "type": "string",
                "const": "revoked"
              },
              "revoked_at": {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              }
            },
            "required": [
              "id",
              "status",
              "revoked_at"
            ]
          }
        },
        "required": [
          "key"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "maintenance",
              "down"
            ],
            "description": "ok; maintenance: read-only, writes are refused; down: the API is switched off or unreachable."
          },
          "read_only": {
            "type": "boolean"
          },
          "trading_enabled": {
            "type": "boolean"
          },
          "giftcards_enabled": {
            "type": "boolean"
          },
          "withdrawals_enabled": {
            "type": "boolean"
          },
          "server_time": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ],
            "description": "The server clock. Signed requests must be within 30 s of it."
          }
        },
        "required": [
          "status",
          "read_only",
          "trading_enabled",
          "giftcards_enabled",
          "withdrawals_enabled",
          "server_time"
        ]
      },
      "Trade": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^tr_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "tr_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          },
          "quote_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^qt_[A-Za-z0-9_-]{1,64}$",
                "examples": [
                  "qt_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "null for trades made before quotes existed."
          },
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "quote_currency": {
            "type": "string",
            "const": "USDC"
          },
          "base_amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "quote_amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "price": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "filled",
              "failed"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "public_api",
              "app",
              "web"
            ],
            "description": "Where the record was made: this API, the mobile app or the webapp."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "filled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "quote_id",
          "asset",
          "side",
          "quote_currency",
          "base_amount",
          "quote_amount",
          "price",
          "status",
          "source",
          "created_at",
          "filled_at",
          "failure_reason"
        ]
      },
      "TradeLimits": {
        "type": "object",
        "properties": {
          "min_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "max_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "daily_volume_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "daily_volume_used_usdc": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "A decimal number as a string.",
            "examples": [
              "0.00104210"
            ]
          },
          "daily_trades": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "daily_trades_used": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "min_usdc",
          "max_usdc",
          "daily_volume_usdc",
          "daily_volume_used_usdc",
          "daily_trades",
          "daily_trades_used"
        ]
      },
      "TradeList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trade"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as cursor for the next page; null at the end."
          }
        },
        "required": [
          "data",
          "next_cursor"
        ]
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^tx_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "tx_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "trade",
              "deposit",
              "withdrawal",
              "fee",
              "gift",
              "giftcode",
              "referral_bonus",
              "loan",
              "hold",
              "other"
            ]
          },
          "action": {
            "type": "string",
            "examples": [
              "buy-btc-usdc"
            ]
          },
          "label": {
            "type": "string",
            "examples": [
              "Buy BTC"
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "asset": {
                  "type": "string",
                  "pattern": "^[A-Z0-9]{1,15}$",
                  "description": "An upper-case asset symbol.",
                  "examples": [
                    "BTC"
                  ]
                },
                "amount": {
                  "type": "string",
                  "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                  "description": "A decimal number as a string.",
                  "examples": [
                    "0.00104210"
                  ]
                },
                "balance_after": {
                  "type": "string",
                  "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                  "description": "A decimal number as a string.",
                  "examples": [
                    "0.00104210"
                  ]
                }
              },
              "required": [
                "asset",
                "amount",
                "balance_after"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "action",
          "label",
          "changes",
          "created_at"
        ]
      },
      "TransactionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as cursor for the next page; null at the end."
          }
        },
        "required": [
          "data",
          "next_cursor"
        ]
      },
      "TravelRule": {
        "type": "object",
        "properties": {
          "address_owner": {
            "type": "string",
            "enum": [
              "self",
              "other"
            ],
            "description": "Whose address it is: yours, or someone else's."
          },
          "wallet_type": {
            "type": "string",
            "enum": [
              "hosted",
              "self_hosted"
            ],
            "description": "hosted: an account at an exchange or other provider; self_hosted: a wallet whose keys the owner holds."
          },
          "beneficiary": {
            "description": "Required when address_owner is other: full_name for an individual, company_name and registration_number for a company.",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "individual",
                  "company"
                ]
              },
              "full_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
              },
              "company_name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
              },
              "registration_number": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          },
          "vasp": {
            "description": "Required when wallet_type is hosted: the exchange that holds the address.",
            "type": "string",
            "enum": [
              "binance",
              "coinbase",
              "kraken",
              "crypto_com",
              "bybit",
              "okx",
              "bitget",
              "kucoin",
              "gate_io",
              "htx",
              "mexc",
              "bitfinex",
              "gemini",
              "bitstamp",
              "upbit",
              "bithumb",
              "bitpanda",
              "etoro",
              "revolut",
              "other"
            ]
          },
          "vasp_name": {
            "description": "The exchange's name when vasp is other.",
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[^\\p{Cc}\\p{Cf}]*$"
          }
        },
        "required": [
          "address_owner",
          "wallet_type"
        ],
        "additionalProperties": false,
        "description": "Travel rule details about the recipient, as the app asks for them."
      },
      "Withdrawal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^wd_[A-Za-z0-9_-]{1,64}$",
            "examples": [
              "wd_01JB8X2Q4M7Z3V9K5T1N6R0P2W"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "bank",
              "crypto"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_confirmation",
              "expired",
              "pending",
              "completed",
              "canceled",
              "failed"
            ],
            "description": "awaiting_confirmation: a crypto withdrawal waiting for the link in the confirmation email; expired: that link was not used in time; pending: being processed; completed: sent; canceled; failed."
          },
          "asset": {
            "type": "string",
            "pattern": "^[A-Z0-9]{1,15}$",
            "description": "An upper-case asset symbol.",
            "examples": [
              "BTC"
            ]
          },
          "network": {
            "description": "Crypto only.",
            "examples": [
              "bitcoin"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
            "description": "Taken from the balance, fee included.",
            "examples": [
              "0.00104210"
            ]
          },
          "fee": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?\\d{1,30}(\\.\\d{1,30})?$",
                "description": "A decimal number as a string.",
                "examples": [
                  "0.00104210"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The withdrawal fee in the asset; null when it isn't known yet."
          },
          "address": {
            "description": "Crypto only.",
            "type": [
              "string",
              "null"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "bank_account": {
            "description": "Bank only.",
            "examples": [
              "0133-26-012345"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "tx_id": {
            "description": "The blockchain transaction id, once sent.",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "public_api",
              "app",
              "web"
            ],
            "description": "Where the record was made: this API, the mobile app or the webapp."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2026-11-03T10:15:10Z"
            ]
          },
          "confirm_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "For awaiting_confirmation: the confirmation email's link works until this time."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "examples": [
                  "2026-11-03T10:15:10Z"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "asset",
          "network",
          "amount",
          "fee",
          "address",
          "memo",
          "bank_account",
          "tx_id",
          "source",
          "created_at",
          "confirm_by",
          "completed_at"
        ]
      },
      "WithdrawalList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Withdrawal"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as cursor for the next page; null at the end."
          }
        },
        "required": [
          "data",
          "next_cursor"
        ]
      }
    },
    "securitySchemes": {
      "MkKeyId": {
        "type": "apiKey",
        "in": "header",
        "name": "MK-Key-Id",
        "description": "The key id, mk_live_… or mk_test_…"
      },
      "MkTimestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "MK-Timestamp",
        "description": "ms since the epoch, ±30 s."
      },
      "MkNonce": {
        "type": "apiKey",
        "in": "header",
        "name": "MK-Nonce",
        "description": "32 lowercase hex characters, never reused."
      },
      "MkSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "MK-Signature",
        "description": "base64 Ed25519 signature of the canonical string (see the introduction)."
      }
    },
    "headers": {
      "MK-Request-Id": {
        "description": "The request's id. Quote it when you contact us.",
        "schema": {
          "type": "string",
          "pattern": "^req_[0-9A-Za-z]{26}$"
        }
      },
      "RateLimit": {
        "description": "Remaining requests per bucket (draft-ietf-httpapi-ratelimit-headers), e.g. `\"key-read-1s\";r=7;t=1`: r requests left, full again in t seconds.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The buckets that apply, e.g. `\"key-read-1s\";q=10;w=2`: q requests per w seconds.",
        "schema": {
          "type": "string"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      }
    }
  }
}
