⚙️
1Konto v1.0 API Docs
  • Welcome!
  • Reference
    • API Reference
    • Service
      • Service Information
      • Service Time
    • Authentication
      • Login and Authentication
    • Market Data
      • Get Top of Book
      • Get Order Book
    • Accounting
      • Get Account
      • Get Account Credit
      • Get Transactions
      • Transfers Instructions
        • Get Deposit Instructions
        • Get Withdraw Instructions
      • Withdraw Requests
        • Request Withdraw - Fiat
        • Request Withdraw - Blockchain
        • Querying for Withdraw Requests
    • Orders
      • Available Asset Pairs
      • Request Indicative Price
      • Market Order
      • Limit Order
      • RFQ - Request for Quote
        • Request Quote
        • Accept Quote
      • Querying for Orders
      • Get Order
Powered by GitBook
On this page
  • Accept RFQ
  • Example
  1. Reference
  2. Orders
  3. RFQ - Request for Quote

Accept Quote

requires auth

Use these endpoint to accept a firm price and execute your order at that price.

Accept RFQ

Upon receiving the successful response from the RFQ, you can submit an "ACCEPT" until the expiration time of the quote (RFQ). This effectively executes your order at the RFQ firm price.

POST /api/v1/routing/account/{accountId}/order/rfq/{orderId}/accept

Path Parameters:

Path
Type
Description

accountId *

string

your account ID

orderId *

string

the order Id generated by the RFQ. It is part of the response body.

Example

POST /api/v1/routing/account/account123/order/rfq/order123/accept
// Successful Response body
{
  "order": {
    "orderId": "order123",
    "accountId": "account123",
    "userId": "",
    "size": "1000 USDC",
    "source": "USDC",
    "destination": "USD",
    "type": "rfq",
    "submittedAt": "2023-06-01T13:50:08.7002606Z",
    "result": {
      "status": "filled",
      "price": "1.0015016016216256264265866187 USD/USDC",
      "invertedPrice": "0.9985006498050584824552634209 USDC/USD",
      "executedAt": "2023-06-01T13:50:09.5341038Z",
      "total": "998.5006498050584824552634209 USD",
      "error": ""
    }
  },
  "status": "ok",
  "httpStatusCode": 200
}

// Error Responses

// Invalid Assets
{
    "errors": [
        "AssetPair not supported in Teloneum environment."
    ],
    "status": "internalServerError",
    "httpStatusCode": 500
}

// accepting a quote that has already been accepted (within the 5sec window) / trying to accept twice at the same time, one of the accepts will succeed the other will fail with this message
{
    "errors": [
        "RFQ: OrderId: RvN3tLX9EEi0778AaFa5ww was already accepted. No action taken."
    ],
    "status": "badRequest",
    "httpStatusCode": 400
}

// accept after 5sec timeout
{
    "errors": [
        "RFQ: AccountId: 7Qr26-ov-1Sn8kmJitGLjA, OrderId: 1awNK1oLvkCYzNfJtxmSnQ has timed out. Please request a new quote."
    ],
    "status": "requestTimeout",
    "httpStatusCode": 408
}

// below minimum size order
{
    "errors": [
        "Insufficient Funds"
    ],
    "status": "conflict",
    "httpStatusCode": 409
}

// venue account has insufficient funds
{
    "errors": [
        "Insufficient Funds"
    ],
    "status": "conflict",
    "httpStatusCode": 409
}

// accepting a quote when client account has insufficient funds for the quote
{
    "errors": [
        "InsufficientFunds for AccountId: accountIDhere, orderId: orderIdHere"
    ],
    "status": "conflict",
    "httpStatusCode": 409

// accept with incorrect orderId / accept before getting quote
{
    "errors": [
        "Must generate quote before accepting RFQ. No action taken."
    ],
    "status": "failedDependency",
    "httpStatusCode": 424
}
// Credit Limit - Error Responses
// outside of normal business hours when submitting order
{
    "orderId": "theOrderIdXXXXXX",
    "errors": [
        "Credit Not Available: 10000 USDT credit requested can not be granted outside of normal business hours.",
    ],
    "status": "failedDependency",
    "httpStatusCode": 424
}

// when we have business hours but account credit available is not enough to fill the order
{
    "orderId": "theOrderIdXXXXXX",
    "errors": [
        "Insufficient Funds: Requested 10000 USDT but only 1000 USDT is available"
    ],
    "status": "failedDependency",
    "httpStatusCode": 424
}

// global credit is not available , or , credit limit not available for destination asset
{
    "orderId": "theOrderIdXXXXXX",
    "errors": [
        "Credit Not Available: Your account is in good standing, but credit is not available at this time. Please contact your account executive."
    ],
    "status": "failedDependency",
    "httpStatusCode": 424
}
// Error Response body
PreviousRequest QuoteNextQuerying for Orders

Last updated 1 year ago

Page cover image