### GET /prices Source: https://api.eldorado.io/guides/quick-start Retrieve current market limits and prices for trading. ```APIDOC ## GET /prices ### Description Retrieve current market limits and prices for trading. ### Method GET ### Endpoint /prices ### Parameters #### Query Parameters None #### Headers - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. ### Request Example ```javascript // Get current limits and prices const limits_prices_response = await fetch('/prices', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const prices_limits_data = await limits_prices_response.json(); ``` ### Response #### Success Response (200) - **[Object containing limits and prices]** - Information about current trading limits and prices. #### Response Example ```json { "limits": { "minOrderAmount": "10", "maxOrderAmount": "10000" }, "prices": { "USDT_USD": "0.99" } } ``` ``` -------------------------------- ### GET /currencies Source: https://api.eldorado.io/guides/quick-start Retrieve a list of supported fiat currencies available for trading. ```APIDOC ## GET /currencies ### Description Retrieve a list of supported fiat currencies available for trading. ### Method GET ### Endpoint /currencies ### Parameters #### Query Parameters None #### Headers - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. ### Request Example ```javascript // Get supported fiat currencies const currencies_response = await fetch('/currencies', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const currencies_data = await currencies_response.json(); ``` ### Response #### Success Response (200) - **[Array of currency objects]** - A list of supported fiat currencies. #### Response Example ```json [ { "id": "USD", "name": "United States Dollar" }, { "id": "EUR", "name": "Euro" } ] ``` ``` -------------------------------- ### POST /quote/sell Source: https://api.eldorado.io/guides/quick-start Create a sell quote for a cryptocurrency transaction. This is the first step in creating a sell order. ```APIDOC ## POST /quote/sell ### Description Create a sell quote for a cryptocurrency transaction. This is the first step in creating a sell order. ### Method POST ### Endpoint /quote/sell ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **addressFrom** (string) - Required - The address that will send the funds. - **token** (string) - Required - The token symbol or address (e.g., 'USDT'). - **chainId** (string) - Required - The chain ID of the network (e.g., '421614'). - **fiatCurrencyId** (string) - Required - The ID of the fiat currency (e.g., 'USD'). - **paymentMethodId** (string) - Required - The ID of the payment method (e.g., 'app_zelle'). - **amount** (string) - Required - The amount of cryptocurrency to sell. - **fixedAmountSide** (string) - Required - The side for the fixed amount ('IN' is currently supported). ### Request Example ```javascript // Create a sell quote const sell_quote_response = await fetch('/quote/sell', { method: 'POST', headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' }, body: JSON.stringify({ addressFrom: '0x0000000000000000000000000000000000000000', // The address that will send the funds token: '0x25f5D414F85b7f4668ADe4E557ef234023208771', // USDT testnet token chainId: '421614', // Arbitrum Sepolia fiatCurrencyId: 'USD', paymentMethodId: 'app_zelle', amount: '12', fixedAmountSide: 'IN' }) }); const sell_quote_data = await sell_quote_response.json(); ``` ### Response #### Success Response (200) - **amountIn** (string) - The amount received in the input token (e.g., USDT). - **amountOut** (string) - The estimated amount received in fiat currency. - **minAmountOut** (string) - The minimum guaranteed amount received in fiat currency. - **fixedAmountSide** (string) - The side for the fixed amount. - **token** (string) - The token symbol. - **chainId** (string) - The chain ID. - **quoteId** (string) - The unique identifier for the quote. - **createdAt** (string) - The timestamp when the quote was created. - **expiresAt** (string) - The timestamp when the quote expires. - **exchangeRate** (string) - The exchange rate between the token and fiat currency. - **fee** (object) - Details about the transaction fees. - **amountInToken** (string) - Fee amount in the input token. - **amountInFiat** (string) - Fee amount in fiat currency. - **breakdown** (object) - Breakdown of fees. - **platformFees** (object) - Platform fees. - **amountInToken** (string) - Platform fee amount in token. - **amountInFiat** (string) - Platform fee amount in fiat. - **rate** (string) - Platform fee rate. - **integratorFees** (object) - Integrator fees. - **amountInToken** (string) - Integrator fee amount in token. - **amountInFiat** (string) - Integrator fee amount in fiat. - **rate** (string) - Integrator fee rate. #### Response Example ```json { "amountIn": "12", "amountOut": "11.51", "minAmountOut": "11.2798", "fixedAmountSide": "IN", "token": "USDT", "chainId": "42161", "quoteId": "XXX-XXX-XXX-XXX-XXXXXXXXXXXX", "createdAt": "XXX-XX-XXTX:XX:XX.XXXZ", "expiresAt": "XXX-XX-XXTX:XX:XX.XXXZ", "exchangeRate": "1", "fee": { "amountInToken": "0.5", "amountInFiat": "0.5", "breakdown": { "platformFees": { "amountInToken": "0.49", "amountInFiat": "0.49", "rate": "0.99" }, "integratorFees": { "amountInToken": "0.01", "amountInFiat": "0.01", "rate": "0.01" } } } } ``` ``` -------------------------------- ### Get Supported Fiat Currencies, Payment Methods, and Prices (JavaScript) Source: https://api.eldorado.io/guides/quick-start Retrieves lists of supported fiat currencies, available payment methods, and current trading limits and prices. This data is crucial for setting up transactions and understanding market conditions. It requires client and referral IDs for identification. ```javascript // Get supported fiat currencies const currencies_response = await fetch('/currencies', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); // Get supported payment methods const payment_methods_response = await fetch('/payment-methods', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); // Get current limits and prices const limits_prices_response = await fetch('/prices', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const currencies_data = await currencies_response.json(); const payment_methods_data = await payment_methods_response.json(); const prices_limits_data = await limits_prices_response.json(); ``` -------------------------------- ### POST /orders/sell Source: https://api.eldorado.io/guides/quick-start Creates a sell order on the Eldorado platform. This endpoint allows users to initiate the process of selling cryptocurrency for fiat currency. ```APIDOC ## POST /orders/sell ### Description Creates a sell order on the Eldorado platform. This endpoint allows users to initiate the process of selling cryptocurrency for fiat currency. ### Method POST ### Endpoint /orders/sell ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Must be `application/json`. - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Optional - Your referral ID. #### Request Body - **fiatDetails** (object) - Required - Details about the fiat transaction. - **details** (object) - Required - Specific fiat details. - **fullName** (string) - Required - Full name of the recipient. - **email** (string) - Required - Email address of the recipient. - **quoteId** (string) - Required - The ID of the quote obtained from a previous quote request. - **externalReferenceId** (string) - Optional - An external reference ID for the order. Allowed characters are numbers, letters, and hyphens. ### Request Example ```json { "fiatDetails": { "details": { "fullName": "John Doe", "email": "john.doe@eldorado.io" } }, "quoteId": "some-quote-id", "externalReferenceId": "123e4567-e89b-12d3-a456-426614174000" } ``` ### Response #### Success Response (200) - **order** (object) - Contains details of the created sell order. - **userId** (string) - The ID of the user. - **apiOrderId** (string) - The unique API order ID. - **orderStatus** (string) - The current status of the order (e.g., `WAITING_FOR_FUNDS`). - **type** (string) - The type of order (`SELL`). - **createdDate** (string) - The date and time the order was created. - **updatedDate** (string) - The date and time the order was last updated. - **quote** (object) - Details of the associated quote. - **fixedAmountSide** (string) - The side with a fixed amount (e.g., `IN`). - **orderType** (string) - The type of order (`SELL`). - **quoteId** (string) - The ID of the quote. - **createdAt** (string) - The date and time the quote was created. - **expiresAt** (string) - The date and time the quote expires. - **in** (object) - Details of the input currency. - **amount** (string) - The amount of the input currency. - **currency** (string) - The currency symbol (e.g., `USDT`). - **chain** (string) - The blockchain chain ID. - **out** (object) - Details of the output currency. - **amount** (string) - The amount of the output currency. - **currency** (string) - The currency symbol (e.g., `USD`). - **paymentMethodId** (string) - The ID of the payment method. - **min** (string) - The minimum amount for the output currency. - **fees** (object) - Fee breakdown for the order. - **amountInToken** (string) - Total fees in the token currency. - **amountInFiat** (string) - Total fees in the fiat currency. - **breakdown** (object) - Detailed fee breakdown. - **platformFees** (object) - Platform fees. - **amountInToken** (string) - Platform fees in token. - **amountInFiat** (string) - Platform fees in fiat. - **rate** (string) - Fee rate. - **integratorFees** (object) - Integrator fees. - **amountInToken** (string) - Integrator fees in token. - **amountInFiat** (string) - Integrator fees in fiat. - **rate** (string) - Fee rate. - **kind** (string) - The kind of quote execution (e.g., `executed`). - **fiatDetails** (object) - Details about the fiat payment. - **paymentMethodId** (string) - The ID of the payment method. - **payeeDetails** (object) - Details of the payee. - **fullName** (string) - Full name of the payee. - **identificationNumber** (string) - Identification number of the payee. - **email** (string) - Email address of the payee. - **txData** (object) - Transaction data for on-chain operations (used for non-custodial wallets). - **chainId** (string) - The chain ID for the transaction. - **data** (string) - The transaction data. - **from** (string) - The sender address. - **to** (string) - The recipient contract address. - **value** (string) - The transaction value. - **gasPrice** (string) - The gas price. - **gasLimit** (string) - The gas limit. - **fromToken** (string) - The token address being sent. - **toToken** (string) - The token address being received. - **fromAmount** (string) - The amount of the token being sent. - **cryptoDetails** (object) - Details for direct crypto deposits (used for custodial wallets). - **tokenAddress** (string) - The address of the token to be deposited. - **chainId** (string) - The chain ID for the deposit. - **depositAddress** (string) - The address where the funds should be deposited. - **dueDate** (string) - The due date for the order. - **externalReferenceId** (string) - The external reference ID provided for the order. #### Response Example ```json { "order": { "userId": "XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "apiOrderId": "YYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY", "orderStatus": "WAITING_FOR_FUNDS", "type": "SELL", "createdDate": "XXX-XX-XXTX:XX:XX.XXXZ", "updatedDate": "XXX-XX-XXTX:XX:XX.XXXZ", "quote": { "fixedAmountSide": "IN", "orderType": "SELL", "quoteId": "XXX-XXX-XXX-XXX-XXXXXXXXXXXX", "createdAt": "XXX-XX-XXTX:XX:XX.XXXZ", "expiresAt": "XXX-XX-XXTX:XX:XX.XXXZ", "in": { "amount": "12", "currency": "USDT", "chain": "421614" }, "out": { "amount": "11.51", "currency": "USD", "paymentMethodId": "app_zelle", "min": "11.2798" }, "fees": { "amountInToken": "0.5", "amountInFiat": "0.5", "breakdown": { "platformFees": { "amountInToken": "0.49", "amountInFiat": "0.49", "rate": "0.99" }, "integratorFees": { "amountInToken": "0.01", "amountInFiat": "0.01", "rate": "0.01" } } }, "kind": "executed" }, "fiatDetails": { "paymentMethodId": "app_zelle", "payeeDetails": { "fullName": "John Doe", "identificationNumber": "Mock-Q56D50AECB", "email": "john.doe@eldorado.io" } }, "txData": { "chainId": "421614", "data": "0x000......00000", "from": "0x000......00001", "to": "0x000......00002", "value": "0x0", "gasPrice": "0x0", "gasLimit": "0x0", "fromToken": "0x25f5D414F85b7f4668ADe4E557ef234023208771", "toToken": "0x25f5D414F85b7f4668ADe4E557ef234023208771", "fromAmount": "12000000000000000000" }, "cryptoDetails": { "tokenAddress": "0x25f5D414F85b7f4668ADe4E557ef234023208771", "chainId": "421614", "depositAddress": "0x000......00002" }, "dueDate": "XXXX-XX-XXTX:XX:XX.XXXZ", "externalReferenceId": "XXXXXXXXXX" } } ``` ``` -------------------------------- ### Get Order Information via API Source: https://api.eldorado.io/guides/quick-start This code snippet demonstrates how to retrieve detailed information about a specific order using the Eldorado API. It makes a GET request to the orders endpoint, requiring an access token for authorization and client/referral IDs for identification. The response is then parsed as JSON. ```javascript const order_response = await fetch(`/orders/${sell_order_data.order.apiOrderId}`, { method: 'GET', headers: { 'Authorization': `Bearer ${accessToken}`, 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const order_data = await order_response.json(); ``` -------------------------------- ### Authentication API Source: https://api.eldorado.io/guides/quick-start This section covers the authentication process to obtain an access token required for subsequent API requests. It involves sending an OTP to the user's email and then verifying it. ```APIDOC ## POST /auth/login/send-otp ### Description Sends an One-Time Password (OTP) to the user's registered email address. ### Method POST ### Endpoint /auth/login/send-otp ### Parameters #### Headers - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. - **Content-Type** (string) - Required - `application/json` #### Request Body - **email** (string) - Required - The user's email address. - **language** (string) - Required - The preferred language for the OTP email (e.g., 'en'). ### Request Example ```json { "email": "john.doe@eldorado.io", "language": "en" } ``` ### Response #### Success Response (200) - **otpIdentifier** (string) - An identifier for the sent OTP, used in the verification step. ## POST /auth/login/verify-otp ### Description Verifies the OTP sent to the user's email and obtains an access token for authenticated API requests. ### Method POST ### Endpoint /auth/login/verify-otp ### Parameters #### Headers - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. - **Content-Type** (string) - Required - `application/json` #### Request Body - **otp** (string) - Required - The OTP received by the user. - **otpIdentifier** (string) - Required - The identifier obtained from the `/auth/login/send-otp` response. - **username** (string) - Required - The username associated with the account. ### Request Example ```json { "otp": "12345678", "otpIdentifier": "some-otp-identifier", "username": "john_doe" } ``` ### Response #### Success Response (200) - **token** (string) - The access token for authenticated API requests. ``` -------------------------------- ### GET /kyc Source: https://api.eldorado.io/guides/quick-start Retrieve the user's KYC status. This endpoint is used to check the current level and status of the user's Know Your Customer verification process. ```APIDOC ## GET /kyc ### Description Retrieve the user's KYC status. This endpoint is used to check the current level and status of the user's Know Your Customer verification process. ### Method GET ### Endpoint /kyc ### Parameters #### Query Parameters None #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. ### Request Example ```javascript // Check your KYC status const kyc_response = await fetch('/kyc', { method: 'GET', headers: { 'Authorization': `Bearer ${accessToken}`, 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const kyc_data = await kyc_response.json(); ``` ### Response #### Success Response (200) - **kyc** (object) - Contains KYC information. - **userId** (string) - The unique identifier for the user. - **kycLevel** (string) - The current KYC level (e.g., 'L1', 'L2'). - **kycStatus** (string) - The status of the KYC verification (e.g., 'passed', 'pending'). - **kycNextLevel** (string) - The next available KYC level. - **kycNextLevelStatus** (string) - The status of the next KYC level (e.g., 'needed'). - **action** (object) - Contains information about the next action required. - **type** (string) - The type of action (e.g., 'url'). - **value** (string) - The URL or value associated with the action. #### Response Example ```json { "kyc": { "userId": "XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "kycLevel": "L1", "kycStatus": "passed", "kycNextLevel": "L2", "kycNextLevelStatus": "needed", "action": { "type": "url", "value": "https://kyc-provider.com/verify/user123" } } } ``` #### Success Response (200 - After completing L2) - **kyc** (object) - Contains KYC information. - **userId** (string) - The unique identifier for the user. - **kycStatus** (string) - The status of the KYC verification. - **kycLevel** (string) - The current KYC level (e.g., 'L2'). - **kycNextLevel** (string) - The next available KYC level (e.g., 'L3'). #### Response Example ```json { "kyc": { "userId": "XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "kycStatus": "passed", "kycLevel": "L2", "kycNextLevel": "L3" } } ``` ``` -------------------------------- ### Authenticate with Eldorado API using JavaScript Source: https://api.eldorado.io/guides/quick-start This snippet demonstrates how to authenticate with the Eldorado API by sending an OTP to an email address and then verifying it to obtain an access token. It requires ClientID, ReferralID, and user's email. ```javascript const send_response = await fetch('/auth/login/send-otp', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' }, body: JSON.stringify({ email: 'john.doe@eldorado.io', language: 'en' }) }); const send_data = await send_response.json(); const verify_response = await fetch('/auth/login/verify-otp', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' }, body: JSON.stringify({ otp: "12345678", otpIdentifier: send_data.otpIdentifier, username: "john_doe" }) }); const verify_data = await verify_response.json(); const accessToken = verify_data.token; ``` -------------------------------- ### KYC Verification API Source: https://api.eldorado.io/guides/quick-start This section details the Know Your Customer (KYC) verification process, including checking KYC status, submitting L1 information, and verifying the phone number via OTP. ```APIDOC ## GET /kyc ### Description Retrieves the current KYC status and information for the authenticated user. ### Method GET ### Endpoint /kyc ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token obtained after authentication (e.g., `Bearer YOUR_ACCESS_TOKEN`). - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. ### Response #### Success Response (200) - **kyc** (object) - Contains KYC details: - **userId** (string) - The unique identifier for the user. - **kycLevel** (string) - The current KYC level (e.g., 'L0', 'L1'). - **kycStatus** (string) - The status of the current KYC level (e.g., 'passed', 'pending'). - **kycNextLevel** (string) - The next KYC level available. - **kycNextLevelStatus** (string) - The status of the next KYC level. - **action** (object) - Details on the next required action: - **type** (string) - The type of action required (e.g., 'form'). - **value** (object) - The data required for the action: - **countryOfResidence** (string) - User's country of residence (ISO code 2 digits). - **cityOfResidence** (string) - User's city of residence. - **phoneNumber** (string) - User's phone number. ### Response Example ```json { "kyc": { "userId": "XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "kycLevel": "L0", "kycStatus": "passed", "kycNextLevel": "L1", "kycNextLevelStatus": "needed", "action": { "type": "form", "value": { "countryOfResidence": "country", "cityOfResidence": "city", "phoneNumber": "phone" } } } } ``` ## POST /kyc ### Description Submits KYC information for a specific level, such as L1. ### Method POST ### Endpoint /kyc ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token obtained after authentication (e.g., `Bearer YOUR_ACCESS_TOKEN`). - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. - **Content-Type** (string) - Required - `application/json` #### Request Body - **data** (object) - Required - KYC data to submit: - **level** (string) - Required - The KYC level to submit (e.g., 'L1'). - **values** (object) - Required - The values for the specified KYC level: - **countryOfResidence** (string) - User's country of residence (ISO code 2 digits). - **cityOfResidence** (string) - User's city of residence. - **phoneNumber** (string) - User's phone number. ### Request Example ```json { "data": { "level": "L1", "values": { "countryOfResidence": "AR", "cityOfResidence": "CABA", "phoneNumber": "+5491112345678" } } } ``` ### Response #### Success Response (200) - (No specific fields mentioned, typically indicates successful submission) ## POST /kyc/phone ### Description Verifies the phone number provided during KYC submission using an OTP sent via WhatsApp. ### Method POST ### Endpoint /kyc/phone ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token obtained after authentication (e.g., `Bearer YOUR_ACCESS_TOKEN`). - **X-Client-ID** (string) - Required - Your client ID. - **X-Referral-ID** (string) - Required - Your referral ID. - **Content-Type** (string) - Required - `application/json` #### Request Body - **code** (string) - Required - The OTP code received via WhatsApp. ### Request Example ```json { "code": "1234" } ``` ### Response #### Success Response (200) - (No specific fields mentioned, typically indicates successful verification) ``` -------------------------------- ### Example API Request with Client Credentials Source: https://api.eldorado.io/authentication/client-credentials An example using cURL to make a POST request to the El Dorado API's login endpoint. It showcases the inclusion of 'X-Client-ID' and 'X-Referral-ID' headers along with a JSON payload. ```bash # Login request with client credentials curl -X POST https://api-testnet.eldorado.io/api/auth/login/send-otp \ -H "Content-Type: application/json" \ -H "X-Client-ID: client_123abc" \ -H "X-Referral-ID: referral_456def" \ -d '{ "email": "user@example.com", "language": "en" }' ``` -------------------------------- ### Create a Sell Quote (JavaScript) Source: https://api.eldorado.io/guides/quick-start Initiates the creation of a quote for a sell order. This involves specifying the token, amount, payment method, and other transaction details. The response includes a quote ID necessary for creating the actual order. Requires an access token and client/referral IDs. ```javascript // Create a sell quote const sell_quote_response = await fetch('/quote/sell', { method: 'POST', headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' }, body: JSON.stringify({ addressFrom: '0x0000000000000000000000000000000000000000', // The address that will send the funds token: '0x25f5D414F85b7f4668ADe4E557ef234023208771', // USDT testnet token chainId: '421614', // Arbitrum Sepolia fiatCurrencyId: 'USD', paymentMethodId: 'app_zelle', amount: '12', fixedAmountSide: 'IN' }) }); const sell_quote_data = await sell_quote_response.json(); ``` -------------------------------- ### Create Sell Order Request (JavaScript) Source: https://api.eldorado.io/guides/quick-start This JavaScript code snippet demonstrates how to create a sell order using the Eldorado IO API. It utilizes the `fetch` API to send a POST request to the '/orders/sell' endpoint with necessary authentication headers and order details in the request body. The response is then parsed as JSON. ```javascript const sell_order_response = await fetch('/orders/sell', { method: 'POST', headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json', 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' }, body: JSON.stringify({ fiatDetails: { details: { fullName: 'John Doe', email: 'john.doe@eldorado.io' } }, quoteId: sell_quote_data.quoteId, externalReferenceId: '123e4567-e89b-12d3-a456-426614174000' // External reference ID to help identify the order (optional, only numbers, letters and hyphens allowed) }) }); const sell_order_data = await sell_order_response.json(); ``` -------------------------------- ### GET /currencies Source: https://api.eldorado.io/trading/general Retrieves a list of all supported currencies, including their details like ID, type, description, symbol, and icon URL. Requires `X-Client-ID` and `X-Referral-ID` headers. ```APIDOC ## GET /currencies ### Description Retrieves a list of all supported currencies by the Eldorado.io platform. This endpoint provides essential information for each currency, enabling users to understand available options for transactions. ### Method GET ### Endpoint /currencies ### Headers - **`X-Client-ID`** (string) - Required - Your unique client identifier. - **`X-Referral-ID`** (string) - Required - Your referral identifier. ### Request Example ```javascript fetch('/currencies', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); ``` ### Response #### Success Response (200) - **currencies** (array) - A list of supported currencies. - **id** (string) - The unique identifier for the currency (e.g., "ARS"). - **type** (string) - The type of currency (e.g., "FIAT"). - **description** (object) - A localized description of the currency. - **es** (string) - Description in Spanish. - **en** (string) - Description in English. - **pt** (string) - Description in Portuguese. - **symbol** (string) - The currency symbol (e.g., "ARS"). - **symbolShort** (string) - A shorter representation of the currency symbol (e.g., "ARS$"). - **iconUrl** (string) - The URL for the currency's icon. #### Response Example ```json { "currencies": [ { "id": "ARS", "type": "FIAT", "description": { "es": "Pesos Argentinos", "en": "Argentine Pesos", "pt": "Pesos Argentinos" }, "symbol": "ARS", "symbolShort": "ARS$", "iconUrl": "https://d2o6j6cadkwny2.cloudfront.net/api/assets/fiat_currencies/currency_ars.png" }, { "id": "COP", "type": "FIAT", "description": { "es": "Pesos Colombianos", "en": "Colombian Pesos", "pt": "Pesos Colombianos" }, "symbol": "COP", "symbolShort": "COL$", "iconUrl": "https://d2o6j6cadkwny2.cloudfront.net/api/assets/fiat_currencies/currency_cop.png" }, { "id": "BRL", "type": "FIAT", "description": { "es": "Real Brasileño", "en": "Brazilian real", "pt": "Reais" }, "symbol": "BRL", "symbolShort": "R$", "iconUrl": "https://d2o6j6cadkwny2.cloudfront.net/api/assets/fiat_currencies/currency_brl.png" } ] } ``` ``` -------------------------------- ### GET /payment-methods Source: https://api.eldorado.io/trading/general Retrieve a list of all supported payment methods. This endpoint is useful for displaying available payment options to users. ```APIDOC ## GET /payment-methods ### Description Retrieves a list of all supported payment methods available through the Eldorado platform. ### Method GET ### Endpoint /payment-methods ### Parameters #### Query Parameters None #### Headers - **X-Client-ID** (string) - Required - Your unique client identifier. - **X-Referral-ID** (string) - Required - The referral ID associated with your request. ### Request Example ```javascript const payment_methods_response = await fetch('/payment-methods', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); const payment_methods_data = await payment_methods_response.json(); ``` ### Response #### Success Response (200) - **paymentMethods** (array) - A list of payment method objects. - **id** (string) - The unique identifier for the payment method. - **name** (string) - The display name of the payment method. - **country** (string) - The country code where the payment method is supported. - **logo** (string) - An identifier for the payment method's logo. - **currency** (string) - The currency supported by this payment method. - **schema** (object) - Defines the schema for the payment method's specific fields. - **iconUrl** (string) - The URL for the payment method's icon. #### Response Example ```json { "paymentMethods": [ { "id": "app_nequi_co", "name": "Nequi (COP)", "country": "CO", "logo": "app_nequi_co", "currency": "COP", "schema": { "type": "object", "properties": { "fullName": { "description": "{ \"en\": \"Full name\", \"pt\": \"Nome completo\", \"es\": \"Nombre completo\" }", "examples": [ "John Doe" ], "title": "{ \"en\": \"Full name\", \"pt\": \"Nome completo\", \"es\": \"Nombre completo\" }", "minLength": 1, "pattern": "^(?!\\s*$).+", "patternDescription": "{ \"en\": \"Full name must not be empty\", \"pt\": \"Nome completo não pode estar vazio\", \"es\": \"El nombre completo no puede estar vacío\" }", "type": "string" }, "accountNumber": { "description": "{ \"en\": \"Account number\", \"pt\": \"Número de conta\", \"es\": \"Número de cuenta\" }", "examples": [ "12345678901234567890" ], "title": "{ \"en\": \"Account number\", \"pt\": \"Número de conta\", \"es\": \"Número de cuenta\" }", "type": "string" }, "identificationNumber": { "description": "{ \"en\": \"Identification number\", \"pt\": \"Número de identificación\", \"es\": \"Número de identificación\" }", "examples": [ "30789441" ], "title": "{ \"en\": \"Identification number\", \"pt\": \"Número de identificación\", \"es\": \"Número de identificación\" }", "type": "string" } }, "required": [ "fullName", "accountNumber", "identificationNumber" ] }, "iconUrl": "https://d2o6j6cadkwny2.cloudfront.net/api/assets/payment_methods/app_nequi_co.png" } ] } ``` ``` -------------------------------- ### Example Error Response Structure Source: https://api.eldorado.io/authentication/client-credentials Provides an example of an error response from the El Dorado API, specifically for authentication failures. It includes fields like 'errorCode', 'message', and 'reason' to help diagnose issues. ```json { "errorCode": "UNAUTHORIZED", "message": "Authentication failed", "reason": "Invalid ClientID" } ``` -------------------------------- ### GET /prices Source: https://api.eldorado.io/trading/general Retrieves current cryptocurrency prices and trading limits for various currencies. Requires `X-Client-ID` and `X-Referral-ID` headers. ```APIDOC ## GET /prices ### Description Retrieves current cryptocurrency prices and trading limits for various currencies. This endpoint is essential for understanding market conditions and user transaction capabilities. ### Method GET ### Endpoint /prices ### Headers - **`X-Client-ID`** (string) - Required - Your unique client identifier. - **`X-Referral-ID`** (string) - Required - Your referral identifier. ### Request Example ```javascript fetch('/prices', { method: 'GET', headers: { 'X-Client-ID': 'your-client-id', 'X-Referral-ID': 'your-referral-id' } }); ``` ### Response #### Success Response (200) - **SELL** (object) - Contains sell prices and limits for different currencies. - **ARS** (object) - Details for Argentine Pesos. - **limits** (object) - Trading limits. - **in** (object) - Minimum limits for incoming transactions (in USDT). - **min** (string) - Minimum amount. - **out** (object) - Minimum limits for outgoing transactions (in ARS). - **min** (string) - Minimum amount. - **price** (string) - The price in ARS per USDT. - **BUY** (object) - Contains buy prices and limits for different currencies. - **ARS** (object) - Details for Argentine Pesos. - **limits** (object) - Trading limits. - **in** (object) - Minimum limits for incoming transactions (in ARS). - **min** (string) - Minimum amount. - **out** (object) - Minimum limits for outgoing transactions (in USDT). - **min** (string) - Minimum amount. - **price** (string) - The price in ARS per USDT. #### Response Example ```json { "SELL": { "ARS": { "limits": { "in": { "min": "2" }, "out": { "min": "2928" } }, "price": "1464" }, "BOB": { "limits": { "in": { "min": "2" }, "out": { "min": "25" } }, "price": "12.5" }, "COP": { "limits": { "in": { "min": "2" }, "out": { "min": "7643" } }, "price": "3821.5" }, "USD": { "limits": { "in": { "min": "5" }, "out": { "min": "4.875" } }, "price": "0.993" } }, "BUY": { "ARS": { "limits": { "in": { "min": "3008.9" }, "out": { "min": "2" } }, "price": "1504.45" }, "BOB": { "limits": { "in": { "min": "25.44" }, "out": { "min": "2" } }, "price": "12.72" }, "COP": { "limits": { "in": { "min": "7799.98" }, "out": { "min": "2" } }, "price": "3899.99" }, "USD": { "limits": { "in": { "min": "5.65" }, "out": { "min": "5" } }, "price": "1.02" } } } ``` ```