### Get Orders Request Example (cURL) Source: https://easybit.com/en/apidocs/index This example shows how to make a GET request to the /orders endpoint using cURL. It demonstrates how to include query parameters such as 'dateFrom', 'sortDirection', and 'status', as well as the required 'API-KEY' header. ```bash curl -X GET 'https://api.easybit.com/orders?dateFrom=1643016313520&sortDirection=ASC&status=Awaiting Deposit' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Supported Currencies List (cURL) Source: https://easybit.com/en/apidocs/index This example shows how to retrieve a list of supported currencies and their networks using a cURL command. It requires an API key in the request header. ```shell curl -X GET 'https://api.easybit.com/currencyList' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Supported Pair List Request Source: https://easybit.com/en/apidocs/index This example demonstrates how to request a list of all supported currency-network pairs from the EasyBit API using a cURL command. It requires an API key in the request header. ```curl curl -X GET 'https://api.easybit.com/pairList' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Account Information Request and Response Source: https://easybit.com/en/apidocs/index Demonstrates how to retrieve account information using a GET request with an API key in the header. It also shows the structure of a successful response, including account level, volume, and fees. ```curl curl -X GET 'https://api.easybit.com/account' -H 'API-KEY: your_api_key' ``` ```HTTP HTTP/1.1 200 OK { "success": 1, "data": { "level": 4, "volume": "305236.82921832", "fee": "0.0016", "extraFee": "0.004", "totalFee": "0.0056" } } ``` -------------------------------- ### Get Order Status Request (cURL) Source: https://easybit.com/en/apidocs/index Example of how to retrieve the status of an order using the EasyBit API. This request requires an API key in the header and the order ID as a parameter. ```cURL curl -X GET 'https://api.easybit.com/orderStatus?id=I1Y0EFP31Rwu' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Pair Information - Successful Response Source: https://easybit.com/en/apidocs/index Example of a successful response when querying pair information. It includes a success flag, minimum and maximum send amounts, network fee, required confirmations, and estimated processing time. ```HTTP HTTP/1.1 200 OK { "success": 1, "data": { "minimumAmount": "0.01075", "maximumAmount": "420", "networkFee": "0.000005", "confirmations": 1, "processingTime": "3-5" } } ``` -------------------------------- ### Successful API Response Example Source: https://easybit.com/en/apidocs/index Demonstrates the structure of a successful API response. It includes a success flag and a data object. This is a standard response for most successful API calls. ```HTTP HTTP/1.1 200 OK { "success": 1, "data": {} } ``` -------------------------------- ### Place Exchange Order - cURL Request Source: https://easybit.com/en/apidocs/index This example demonstrates how to place an exchange order using cURL. It shows the POST request to the /order endpoint, including the necessary API-KEY header and the JSON payload containing order details. ```shell curl -X POST 'https://api.easybit.com/order' -H 'API-KEY: your_api_key' -H "Content-type: application/json" -d '{"send":"BTC","receive":"ETH","amount":"0.123","receiveAddress":"0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf"}' ``` -------------------------------- ### GET /orders Source: https://easybit.com/en/apidocs/index Retrieves a list of orders based on specified filters. Requires an API key for authentication. ```APIDOC ## GET /orders ### Description Retrieves a list of orders with filtering options such as date range, status, and sorting. An API key is required in the header for authentication. ### Method GET ### Endpoint https://api.easybit.com/orders ### Parameters #### Header Parameters - **API-KEY** (String) - Required - Your API key #### Query Parameters - **id** (String) - Optional - Order id - **limit** (Integer) - Optional - Number of orders to retrieve (e.g., 100, 500, 1000, 2000) - **dateFrom** (Integer) - Optional - Orders created after this Timestamp (UTC) in milliseconds - **dateTo** (Integer) - Optional - Orders created before this Timestamp (UTC) in milliseconds - **sortDirection** (String) - Optional - Sort order ('DESC' or 'ASC', defaults to 'DESC') - **status** (String) - Optional - Filter orders by a specific status (e.g., "Awaiting Deposit") ### Request Example ```curl curl -X GET 'https://api.easybit.com/orders?dateFrom=1643016313520&sortDirection=ASC&status=Awaiting Deposit' -H 'API-KEY: your_api_key' ``` ### Response #### Success Response (200) - **success** (Integer) - Success flag (1 for success, 0 for failure) - **data** (Object[]) - An array of order objects. - **id** (String) - The unique identifier for the order. - **send** (String) - Ticker symbol of the currency being sent. - **receive** (String) - Ticker symbol of the currency being received. - **sendNetwork** (String) - Network used for sending the currency. - **receiveNetwork** (String) - Network used for receiving the currency. - **sendAmount** (String) - The final amount of the currency sent. - **receiveAmount** (String) - The final amount of the currency received. - **estimatedSendAmount** (String) - The estimated amount of currency sent when the order was placed. - **estimatedReceiveAmount** (String) - The estimated amount of currency received when the order was placed. - **sendAddress** (String) - The wallet address for sending funds. - **sendTag** (String) - The wallet tag for sending funds (if applicable). - **receiveAddress** (String) - The wallet address for receiving funds. - **receiveTag** (String) - The wallet tag for receiving funds (if applicable). - **refundAddress** (String) - The wallet address for refunds. - **refundTag** (String) - The wallet tag for refunds (if applicable). - **vpm** (String) - Volatility Protection Mode status ('on' or 'off'). - **status** (String) - The current status of the order (e.g., "Awaiting Deposit", "Confirming Deposit", "Exchanging", "Sending", "Complete", "Refund", "Failed", "Volatility Protection", "Action Request", "Request Overdue"). - **statusNote** (String) - Additional notes regarding the order status, such as transaction issues or network congestion. - **hashIn** (Array) - An array of transaction hashes (Txids) for incoming transfers. - **hashOut** (Array) - An array of transaction hashes (Txids) for outgoing transfers. - **networkFee** (String) - The network fee for the receive currency, included in `receiveAmount`. - **earned** (String) - The profit or loss in USDT. - **createdAt** (Integer) - Timestamp (UTC) in milliseconds when the order was created. - **updatedAt** (Integer) - Timestamp (UTC) in milliseconds when the order was last updated. #### Response Example (200 OK) ```json { "success": 1, "data": [ { "id": "I1Y0EFP31Rwu", "send": "BTC", "receive": "ETH", "sendNetwork": "BTC", "receiveNetwork": "ETH", "sendAmount": "0.123", "receiveAmount": "1.73703678", "estimatedSendAmount": "0.123", "estimatedReceiveAmount": "1.73703678", "sendAddress": "1NiwKhcuV4Xrep5gnki4enFBBRH6hHuKzf", "sendTag": null, "receiveAddress": "0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf", "receiveTag": null, "refundAddress": null, "refundTag": null, "vpm": "off", "status": "Awaiting Deposit", "statusNote": null, "hashIn": null, "hashOut": null, "networkFee": "0", "earned": "0", "createdAt": 1643036313520, "updatedAt": 1643036313520 }, { ... } ] } ``` #### Error Response (400 Bad Request) - **success** (Integer) - Success flag (0 for failure) - **errorMessage** (String) - Description of the error. - **errorCode** (Integer) - Code representing the error type. #### Response Example (400 Bad Request) ```json { "success": 0, "errorMessage": "Invalid order id", "errorCode": 2001 } ``` ``` -------------------------------- ### GET /pairInfo Source: https://easybit.com/en/apidocs/index Retrieves detailed information about a specific currency pair, including network details, minimum/maximum amounts, network fees, confirmations, and processing times. ```APIDOC ## GET /pairInfo ### Description Retrieves detailed information about a specific currency pair, including network details, minimum/maximum amounts, network fees, confirmations, and processing times. ### Method GET ### Endpoint https://api.easybit.com/pairInfo ### Parameters #### Header Parameters - **API-KEY** (String) - Required - Your API key #### Query Parameters - **send** (String) - Required - Ticker of currency to send - **receive** (String) - Required - Ticker of currency to receive - **sendNetwork** (String) - Optional - Ticker of network to send. Default network will be selected if omitted - **receiveNetwork** (String) - Optional - Ticker of network to receive. Default network will be selected if omitted - **amountType** (String) - Optional - Set this parameter as "receive" if you want to get the minimum and/or maximum of the receiving amount ### Request Example ```bash curl -X GET 'https://api.easybit.com/pairInfo?send=ETH&receive=BTC&sendNetwork=BNB&receiveNetwork=BSC' -H 'API-KEY: your_api_key' ``` ### Response #### Success Response (200) - **success** (Integer) - Success flag - **data** (Object) - The response data object - **minimumAmount** (String) - Minimum amount to send - **maximumAmount** (String) - Maximum amount to send - **networkFee** (String) - Network fee of the receive currency (Included in the receiveAmount) - **confirmations** (Integer) - The number of confirmations required to confirm the order - **processingTime** (String) - Dash-separated min and max estimated processing time in minutes #### Response Example ```json { "success": 1, "data": { "minimumAmount": "0.01075", "maximumAmount": "420", "networkFee": "0.000005", "confirmations": 1, "processingTime": "3-5" } } ``` #### Error Responses - **success** (Integer) - Success flag - **errorMessage** (String) - Error message - **errorCode** (Integer) - Error code - **data** (Object) - Optional - Data object - **currency** (String) - Requested currency - **network** (String) - Requested network - **side** (String) - Send or receive side * Error Codes: * 1001: Unsupported currency * 1002: Unsupported pair of currencies-networks * 1003: Unsupported network for currency * 1004: Currency suspended for specified network. Try again later * 1011: Could not provide rates for this pair of currencies. Try again later #### Error Example (1001) ```json { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` ``` -------------------------------- ### Get Pair Information - Error Response (Unsupported Network) Source: https://easybit.com/en/apidocs/index Example of an error response when the specified network is unsupported for the given currency. It includes a failure flag, error message, error code, and data detailing the currency, network, and side. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported network for currency", "errorCode": 1003, "data": { "currency": "BTC", "network": "BTL", "side": "send" } } ``` -------------------------------- ### Error Response Example Source: https://easybit.com/en/apidocs/index This snippet illustrates the format of an error response from the API. It typically includes a 'success' flag set to 0, an 'errorMessage', and an 'errorCode'. This example shows an 'Invalid order id' error. ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid order id", "errorCode": 2001 } ``` -------------------------------- ### Successful Order Response Example Source: https://easybit.com/en/apidocs/index This snippet demonstrates the structure of a successful response when retrieving order details. It includes fields like order ID, status, amounts, and timestamps. The 'data' field is an array of order objects. ```json HTTP/1.1 200 OK { "success": 1, "data": { "id": "I1Y0EFP31Rwu", "status": "Awaiting Deposit", "statusNote": null, "receiveAmount": "1.73703678", "hashIn": null, "hashOut": null, "createdAt": 1643036313520, "updatedAt": 1643036313520 } } ``` -------------------------------- ### Get Pair Information - Error Response (Unsupported Currency) Source: https://easybit.com/en/apidocs/index Example of an error response when the requested currency is unsupported. It returns a failure flag, an error message, an error code, and optional data including the problematic currency and side. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` -------------------------------- ### Validate Address API Request Example (cURL) Source: https://easybit.com/en/apidocs/index This cURL command demonstrates how to validate a wallet address and optional tag for a specified coin and network using the EasyBit API. It requires an API key in the header. ```bash curl -X GET 'https://api.easybit.com/validateAddress?currency=BTC&address=0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf&network=BSC' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Pair Information - Error Response (Unsupported Pair) Source: https://easybit.com/en/apidocs/index Example of an error response when the requested pair of currencies or networks is unsupported. It returns a failure flag, an error message, and an error code. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported pair of currencies-networks", "errorCode": 1002 } ``` -------------------------------- ### Get Pair Information - Error Response (Rate Unavailable) Source: https://easybit.com/en/apidocs/index Example of an error response when rates cannot be provided for the requested currency pair. It suggests retrying later. Includes success flag, error message, and error code. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Could not provide rates for this pair of currencies. Try again later", "errorCode": 1011 } ``` -------------------------------- ### Successful API Response Example Source: https://easybit.com/en/apidocs/index This snippet demonstrates a successful API response, indicating a success flag of 1 and providing fee details within the data object. It's a standard JSON object returned upon successful operations. ```json HTTP/1.1 200 OK { "success": 1, "data": { "fee": "0.0019", "extraFee": "0.005", "totalFee": "0.0069" } } ``` -------------------------------- ### Successful API Response Example Source: https://easybit.com/en/apidocs/index This snippet demonstrates a successful response from the EasyBit API, including transaction details like rates, amounts, and processing times. It indicates a success flag of 1. ```json HTTP/1.1 200 OK { "success": 1, "data": { "rate": "0.08195835", "sendAmount": "0.1", "receiveAmount": "0.00819083", "networkFee": "0.000005", "confirmations": 1, "processingTime": "3-5" } } ``` -------------------------------- ### Place Exchange Order - JSON Request Body Source: https://easybit.com/en/apidocs/index This is an example of the JSON request body for placing an exchange order. It includes the currencies to send and receive, the amount, and the recipient's address. Optional parameters like network, tag, and fee overrides can also be included. ```json { "send": "BTC", "receive": "ETH", "amount": "0.123", "receiveAddress": "0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf" } ``` -------------------------------- ### Set Extra Fee Request Source: https://easybit.com/en/apidocs/index Provides examples for setting an account-specific extra fee using a POST request. It includes the endpoint, required headers, and the JSON body format for the extraFee parameter. ```curl curl -X POST 'https://api.easybit.com/setExtraFee' -H 'API-KEY: your_api_key' -H "Content-type: application/json" -d '{"extraFee":0.005}' ``` ```JSON { "extraFee": 0.005 } ``` -------------------------------- ### GET /rate Source: https://easybit.com/en/apidocs/index Retrieves the exchange rate for a specified pair of currencies and amount, considering optional network and fee overrides. ```APIDOC ## GET /rate ### Description Retrieves the exchange rate for a specified pair of currencies and amount, considering optional network and fee overrides. ### Method GET ### Endpoint https://api.easybit.com/rate ### Parameters #### Header Parameters - **API-KEY** (String) - Required - Your API key #### Query Parameters - **send** (String) - Required - Ticker of currency to send - **receive** (String) - Required - Ticker of currency to receive - **amount** (Float) - Required - Amount to send - **sendNetwork** (String) - Optional - Ticker of network to send. Default network will be selected if omitted - **receiveNetwork** (String) - Optional - Ticker of network to receive. Default network will be selected if omitted - **amountType** (String) - Optional - Set this parameter as "receive" if you want to specify as "amount" the receive amount - **extraFeeOverride** (Float) - Optional - Use this parameter to override the extra fee for a specific call. Allowed value range: 0-0.1, Maximum step size: 0.0001 ### Request Example ```bash curl -X GET 'https://api.easybit.com/rate?send=ETH&receive=BTC&sendNetwork=BNB&receiveNetwork=BSC&amount=0.1' -H 'API-KEY: your_api_key' ``` ### Response #### Success Response (200) - **success** (Integer) - Success flag - **data** (Object) - The response data object - **rate** (String) - The exchange rate - **minimumAmount** (String) - Minimum amount to send - **maximumAmount** (String) - Maximum amount to send - **networkFee** (String) - Network fee of the receive currency (Included in the receiveAmount) - **confirmations** (Integer) - The number of confirmations required to confirm the order - **processingTime** (String) - Dash-separated min and max estimated processing time in minutes #### Response Example ```json { "success": 1, "data": { "rate": "0.065", "minimumAmount": "0.01075", "maximumAmount": "420", "networkFee": "0.000005", "confirmations": 1, "processingTime": "3-5" } } ``` #### Error Responses - **success** (Integer) - Success flag - **errorMessage** (String) - Error message - **errorCode** (Integer) - Error code - **data** (Object) - Optional - Data object - **currency** (String) - Requested currency - **network** (String) - Requested network - **side** (String) - Send or receive side * Error Codes: * 1001: Unsupported currency * 1002: Unsupported pair of currencies-networks * 1003: Unsupported network for currency * 1004: Currency suspended for specified network. Try again later * 1011: Could not provide rates for this pair of currencies. Try again later #### Error Example (1001) ```json { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` ``` -------------------------------- ### Successful API Response Example Source: https://easybit.com/en/apidocs/index This snippet demonstrates a typical successful HTTP response from the EasyBit API. It includes a success flag and a data object containing transaction-specific details such as order ID, currency information, amounts, addresses, and creation timestamp. ```http HTTP/1.1 200 OK { "success": 1, "data": { "id": "I1Y0EFP31Rwu", "send": "BTC", "receive": "ETH", "sendNetwork": "BTC", "receiveNetwork": "ETH", "sendAmount": "0.123", "receiveAmount": "1.73703678", "sendAddress": "1NiwKhcuV4Xrep5gnki4enFBBRH6hHuKzf", "sendTag": null, "receiveAddress": "0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf", "receiveTag": null, "refundAddress": null, "refundTag": null, "vpm": "off", "createdAt": 1643036313520 } } ``` -------------------------------- ### Error API Response Example Source: https://easybit.com/en/apidocs/index Illustrates the format of an error response from the API. It contains a success flag (0 for error), an error message, and an error code. An optional data object may also be included. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Error Message", "errorCode": 400, "data": {} } ``` -------------------------------- ### Get Exchange Rates Source: https://easybit.com/en/apidocs/index Retrieves current exchange rates, including send amounts, receive amounts, and network fees. ```APIDOC ## GET /api/rates ### Description Retrieves current exchange rates, including send amounts, receive amounts, and network fees. ### Method GET ### Endpoint /api/rates ### Query Parameters - **sendCurrency** (String) - Required - The currency to send. - **receiveCurrency** (String) - Required - The currency to receive. - **sendAmount** (String) - Required - The amount to send. - **network** (String) - Optional - The network to use for the transaction. - **extraFee** (String) - Optional - An extra fee to apply to the transaction. ### Response #### Success Response (200) - **success** (Integer) - Success flag. - **data** (Object) - The response data object. - **rate** (String) - Actual rate (Exchange fee + API extra fee included). - **sendAmount** (String) - The amount you have to send. - **receiveAmount** (String) - Estimated receive amount (All fees included). - **networkFee** (String) - Network fee of the receive currency (Included in the receiveAmount). - **confirmations** (Integer) - The number of confirmations required to confirm the order. - **processingTime** (String) - Dash-separated min and max estimated processing time in minutes. #### Response Example (200 OK) ```json { "success": 1, "data": { "rate": "0.08195835", "sendAmount": "0.1", "receiveAmount": "0.00819083", "networkFee": "0.000005", "confirmations": 1, "processingTime": "3-5" } } ``` #### Error Response (400 Bad Request) - **success** (Integer) - Success flag (0 for error). - **errorMessage** (String) - Error message. - **errorCode** (Integer) - Error code. - **data** (Object) - Optional data object containing details about the error. - **currency** (String) - Requested currency (if applicable). - **network** (String) - Requested network (if applicable). - **side** (String) - Send or receive side (if applicable). - **minimumAmount** (String) - The minimum amount that can be sent or received. - **maximumAmount** (String) - The maximum amount that can be sent or received. #### Response Example (400 Bad Request - Unsupported currency) ```json { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` ``` -------------------------------- ### Get Pair Information - Error Response (Suspended Currency) Source: https://easybit.com/en/apidocs/index Example of an error response when a currency is suspended for the specified network. It indicates a temporary issue and suggests retrying later. Includes success flag, error message, error code, and data. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Currency suspended for specified network. Try again later", "errorCode": 1004, "data": { "currency": "BTC", "network": "BTC", "side": "send" } } ``` -------------------------------- ### Error API Response Examples Source: https://easybit.com/en/apidocs/index These snippets illustrate various error responses from the EasyBit API. Each response includes a success flag of 0, an error message, and an error code. These are crucial for understanding and handling API failures. ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid extra fee value. Enter a value between 0-0.1", "errorCode": 3001 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Access to this method is granted only to API partners. If you would like to become an API partner contact us at support@easybit.com", "errorCode": 3002 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "You cannot set an extra fee. You are in affiliate share program", "errorCode": 3003 } ``` -------------------------------- ### API Error Response Examples Source: https://easybit.com/en/apidocs/index These snippets illustrate various error responses from the EasyBit API. Each response includes a success flag of 0, an error message, and an error code, along with optional data fields that provide context for the error. ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported pair of currencies-networks", "errorCode": 1002 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported network for currency", "errorCode": 1003, "data": { "currency": "BTC", "network": "BTL", "side": "send" } } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Currency suspended for specified network. Try again later", "errorCode": 1004, "data": { "currency": "BTC", "network": "BTC", "side": "send" } } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Not allowed amount", "errorCode": 1008, "data": { "minimumAmount": "0.00186", "maximumAmount": "30" } } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Could not provide rates for this pair of currencies. Try again later", "errorCode": 1011 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid extra fee value. Enter a value between 0-0.1", "errorCode": 3001 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "You cannot set an extra fee. You are in affiliate share program", "errorCode": 3003 } ``` ```json HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Access to the extraFeeOverride parameter is granted only to API partners. If you would like to become an API partner contact us at support@easybit.com", "errorCode": 3005 } ``` -------------------------------- ### Common API Error Responses (HTTP) Source: https://easybit.com/en/apidocs/index Illustrates typical HTTP error responses from the EasyBit API. These examples show the structure of error payloads, including success status, error messages, and specific error codes. ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "We cannot accept any orders at the moment. Try again later", "errorCode": 1000 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL", "side": "send" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported pair of currencies-networks", "errorCode": 1002 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Unsupported network for currency", "errorCode": 1003, "data": { "currency": "BTC", "network": "BTL", "side": "send" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Currency suspended for specified network. Try again later", "errorCode": 1004, "data": { "currency": "BTC", "network": "BTC", "side": "send" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid address for specified network", "errorCode": 1005, "data": { "currency": "BTC", "network": "BTC", "address": "0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Tag is not supported for specified network", "errorCode": 1006, "data": { "currency": "BTC", "network": "BTC" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid tag for specified network", "errorCode": 1007, "data": { "currency": "XRP", "network": "XRP", "tag": "cd2f4dsk2-2x4V2f" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Not allowed amount", "errorCode": 1008, "data": { "minimumAmount": "0.00186", "maximumAmount": "30" } } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid VPM value. Enter a value between 1-5", "errorCode": 1009 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Refund address is required when VPM is on", "errorCode": 1010 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Could not provide rates for this pair of currencies. Try again later", "errorCode": 1011 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Invalid extra fee value. Enter a value between 0-0.1", "errorCode": 3001 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "You cannot set an extra fee. You are in affiliate share program", "errorCode": 3003 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "VPM is disabled for your account. To enable it contact our support team", "errorCode": 3004 } ``` ```HTTP HTTP/1.1 400 Bad Request { "success": 0, "errorMessage": "Access to the extraFeeOverride parameter is granted only to API partners. If you would like to become an API partner contact us at support@easybit.com", "errorCode": 3005 } ``` -------------------------------- ### Get Exchange Rate - cURL Source: https://easybit.com/en/apidocs/index Retrieves the exchange rate for a given currency pair and amount. Requires an API key and specifies send/receive currencies, amount, and optionally networks. Allows overriding extra fees. ```cURL curl -X GET 'https://api.easybit.com/rate?send=ETH&receive=BTC&sendNetwork=BNB&receiveNetwork=BSC&amount=0.1' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Get Pair Information - cURL Source: https://easybit.com/en/apidocs/index Retrieves information about a currency pair, including minimum/maximum amounts, network fees, and processing times. Requires an API key in the header and specifies send/receive currencies and optionally networks. Returns a success flag and a data object with pair details or an error message. ```cURL curl -X GET 'https://api.easybit.com/pairInfo?send=ETH&receive=BTC&sendNetwork=BNB&receiveNetwork=BSC' -H 'API-KEY: your_api_key' ``` -------------------------------- ### Place Order API Source: https://easybit.com/en/apidocs/index Allows users to place an exchange order by specifying the currencies to send and receive, the amount, and the recipient's address. Optional parameters allow for network selection, tag specification, amount type, fee overrides, and volatility protection. ```APIDOC ## POST /order ### Description Place an exchange order. ### Method POST ### Endpoint https://api.easybit.com/order ### Headers - **API-KEY** (String) - Required - Your API key ### Parameters #### Query Parameters - **send** (String) - Required - Ticker of currency to send - **receive** (String) - Required - Ticker of currency to receive - **amount** (Float) - Required - The amount you have to send - **receiveAddress** (String) - Required - Receive wallet address - **sendNetwork** (String) - Optional - Ticker of network to send. Default network will be selected if omitted - **receiveNetwork** (String) - Optional - Ticker of network to receive. Default network will be selected if omitted - **receiveTag** (String) - Optional - Receive wallet address tag - **amountType** (String) - Optional - Set this parameter as "receive" if you want to specify as "amount" the receive amount - **extraFeeOverride** (Float) - Optional - Use this parameter to override the extra fee for a specific call. Allowed value range: 0-0.1, Maximum step size: 0.0001 - **vpm** (String) - Optional - Volatility Protection Mode, 1-5 (maximum step size is 0.1) (If rates drop over the selected percentage cancel and refund) - **refundAddress** (String) - Optional - In case Volatility Protection Mode is on, you have to enter a refund address - **refundTag** (String) - Optional - In case Volatility Protection Mode is on, you may enter a refund tag ### Request Example ```json { "send": "BTC", "receive": "ETH", "amount": "0.123", "receiveAddress": "0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf" } ``` ### Request Example (cURL) ```bash curl -X POST 'https://api.easybit.com/order' \ -H 'API-KEY: your_api_key' \ -H "Content-type: application/json" \ -d '{"send":"BTC","receive":"ETH","amount":"0.123","receiveAddress":"0xeB2629a2734e272Bcc07BDA959863f316F4bD4Cf"}' ``` ### Response #### Success Response (200) - **success** (Integer) - Success flag - **errorMessage** (String) - Error message - **errorCode** (Integer) - Error code - **data** (Object) - Data object - **currency** (String) - Requested currency - **network** (String) - Requested network - **address** (String) - Requested address - **tag** (String) - Requested tag #### Response Example (Success) ```json { "success": 1, "errorMessage": null, "errorCode": null, "data": { "currency": "BTC", "network": "BTC", "address": "1A1zP1eP59KUzyXrcnxXfK7q1g7gmkG4aT", "tag": null } } ``` #### Error Responses - **1001**: Unsupported currency - **1003**: Unsupported network for currency - **1005**: Invalid address for specified network - **1006**: Tag is not supported for specified network - **1007**: Invalid tag for specified network #### Error Response Example (1001) ```json { "success": 0, "errorMessage": "Unsupported currency", "errorCode": 1001, "data": { "currency": "BTL" } } ``` ``` -------------------------------- ### Supported Pair List Source: https://easybit.com/en/apidocs/index Retrieves a list of all supported currency-network pairs for trading. ```APIDOC ## GET /pairList ### Description Retrieves a list of all supported currency-network pairs for trading. The pairs are formatted as "sendCurrency_sendNetwork_receiveCurrency_receiveNetwork". ### Method GET ### Endpoint /pairList ### Parameters #### Header Parameters - **API-KEY** (string) - Required - Your API key for authentication. ### Request Example ```bash curl -X GET 'https://api.easybit.com/pairList' -H 'API-KEY: your_api_key' ``` ### Response #### Success Response (200) - **success** (integer) - Success flag (1 for success, 0 for failure). - **data** (string[]) - An array of strings, where each string represents a supported currency-network pair in the format "sendCurrency_sendNetwork_receiveCurrency_receiveNetwork". ### Response Example ```json { "success": 1, "data": [ "BTC_BTC_ETH_ETH", "BTC_BSC_USDT_TRX" ] } ``` ``` -------------------------------- ### Premium Partner Endpoints Source: https://easybit.com/en/apidocs/index This section outlines API endpoints exclusively available to Premium API Partners. Access requires contacting support. ```APIDOC ## Premium Partner Endpoints ### Description Access to the following endpoints is granted only to premium API partners. To become a premium partner, please contact our Support team. ### POST /updateOrder #### Description Allows premium partners to update an existing order. #### Method POST #### Endpoint `https://api.easybit.com/updateOrder` ### POST /pauseOrder #### Description Allows premium partners to pause an existing order. #### Method POST #### Endpoint `https://api.easybit.com/pauseOrder` ### POST /resumeOrder #### Description Allows premium partners to resume a paused order. #### Method POST #### Endpoint `https://api.easybit.com/resumeOrder` ### POST /refundOrder #### Description Allows premium partners to refund an existing order. #### Method POST #### Endpoint `https://api.easybit.com/refundOrder` ``` -------------------------------- ### Account Information API Source: https://easybit.com/en/apidocs/index Retrieves information about the authenticated user's account, including level, trading volume, and fee details. ```APIDOC ## GET /account ### Description Retrieves your account information. ### Method GET ### Endpoint https://api.easybit.com/account ### Parameters #### Header Parameters - **API-KEY** (String) - Required - Your API key ### Request Example ```bash curl -X GET 'https://api.easybit.com/account' -H 'API-KEY: your_api_key' ``` ### Response #### Success Response (200) - **success** (Integer) - Success flag - **data** (Object) - The response data object - **level** (Integer) - Your account level - **volume** (String) - Your exchange volume for the current month in USDT - **fee** (String) - Our fee based on your account level - **extraFee** (String) - The API extra fee you set - **totalFee** (String) - Total fee for your users #### Response Example ```json { "success": 1, "data": { "level": 4, "volume": "305236.82921832", "fee": "0.0016", "extraFee": "0.004", "totalFee": "0.0056" } } ``` ```