Orders

Create a Buy Order

Creates a buy order request for exchanging fiat currency for cryptocurrency, specifying payment and cryptocurrency details.

post/orders/buy

Request

  • Base URL: https://api.eldorado.io/api
  • URL: https://api.eldorado.io/api/orders/buy
  • Auth: none declared. Required headers: X-Client-ID, X-Referral-ID, Authorization

Headers

X-Client-IDstring required
X-Referral-IDstring required
User-Agentstring
Authorizationstring required

Bearer token

Request body

quoteIdstring required

The ID of the quote to use for the order.

externalReferenceIdstring

An external reference ID to help identify the order (only letters, numbers, and hyphens allowed)

Example request

{
  "fiatDetails": {
    "details": {
      "bankName": "SuperBank",
      "accountNumber": "1000AB12345"
    }
  },
  "cryptoDetails": {
    "recipientAddress": "0x1234567890",
    "tokenAddress": "0x1234567890",
    "chainId": "0x1"
  },
  "quoteId": "123e4567-e89b-12d3-a456-426614174000",
  "externalReferenceId": "123e4567-e89b-12d3-a456-426614174000"
}

Response

New order details

Example response

{
  "order": {
    "userId": "user_123",
    "apiOrderId": "order_123",
    "orderStatus": "REQUESTED",
    "type": "BUY",
    "createdDate": "2023-01-01T00:00:00Z",
    "updatedDate": "2023-01-01T00:00:00Z",
    "quote": {
      "quoteId": "quote_123",
      "createdAt": "2023-01-01T00:00:00Z",
      "expiresAt": "2023-01-01T00:00:00Z",
      "fixedAmountSide": "IN",
      "orderType": "BUY",
      "fees": {
        "amountInToken": "0.02",
        "amountInFiat": "0.02",
        "breakdown": {
          "platformFees": {
            "amountInToken": "0.01",
            "amountInFiat": "0.01",
            "rate": "0.5"
          },
          "integratorFees": {
            "amountInToken": "0.01",
            "amountInFiat": "0.01",
            "rate": "0.5"
          }
        }
      },
      "in": {
        "amount": "100",
        "currency": "USD",
        "paymentMethodId": "pm_123"
      },
      "out": {
        "amount": "0.1",
        "currency": "BTC",
        "chain": "BTC",
        "min": "0.1"
      },
      "kind": "estimate"
    },
    "fiatDetails": {
      "paymentMethodId": "pm_123",
      "payerDetails": {
        "name": "John Doe",
        "email": "john.doe@example.com"
      },
      "payerDetailsId": "payer_123",
      "payeeDetails": {
        "name": "Jane Doe",
        "email": "jane.doe@example.com"
      },
      "payeeDetailsId": "payee_123"
    },
    "cryptoDetails": {
      "tokenAddress": "0x1234567890abcdef",
      "chainId": "1",
      "recipientAddress": "0xabcdef1234567890"
    },
    "dueDate": "2023-01-01T00:00:00Z",
    "externalReferenceId": "123e4567-e89b-12d3-a456-426614174000",
    "transferInfo": {
      "txHash": "0x1234567890abcdef",
      "txHashDestination": "0xabcdef1234567890",
      "transferDate": "2023-01-01T00:00:00Z",
      "amountOut": "100"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.