### Order Operations Source: https://api.n.exchange/docs/v2/index Endpoints for creating, retrieving, and updating orders. ```APIDOC ## POST /orders/ ### Description Creates a new exchange order. ### Method POST ### Endpoint /orders/ ### Parameters #### Request Body - **pair** (string) - Required - The currency pair for the order (e.g., "BTC-USDTERC"). - **side** (string) - Required - The direction of the order, either "BUY" or "SELL". - **deposit_amount** (string) - Required if side is "BUY" - The amount of the receiving currency. - **withdraw_amount** (string) - Required if side is "SELL" - The amount of the sending currency. - **referral_code** (string) - Optional - A referral code to associate with the order. ### Request Example ```json { "pair": "BTC-USDTERC", "side": "BUY", "deposit_amount": "100", "referral_code": "REF123" } ``` ### Response #### Success Response (200) - **order** (object) - Details of the created order. - **unique_reference** (string) - A unique identifier for the order. - **status** (string) - The current status of the order. - **deposit_currency** (string) - The currency being received. - **withdraw_currency** (string) - The currency being sent. - **deposit_amount** (string) - The amount of the receiving currency. - **withdraw_amount** (string) - The amount of the sending currency. - **rate** (string) - The exchange rate applied. - **fee** (string) - The transaction fee. - **created_at** (string) - Timestamp when the order was created. - **expires_at** (string) - Timestamp when the order expires. #### Response Example ```json { "order": { "unique_reference": "ORD123456789", "status": "PENDING_DEPOSIT", "deposit_currency": "USDT", "withdraw_currency": "BTC", "deposit_amount": "100", "withdraw_amount": "0.004", "rate": "25000", "fee": "0.5", "created_at": "2023-10-27T09:00:00Z", "expires_at": "2023-10-27T09:15:00Z" } } ``` ## GET /orders/ ### Description Lists all orders associated with the API key. ### Method GET ### Endpoint /orders/ ### Parameters #### Query Parameters - **status** (string) - Optional - Filter orders by status (e.g., "COMPLETED", "PENDING"). - **limit** (integer) - Optional - Number of orders to return per page. - **offset** (integer) - Optional - Number of orders to skip. ### Response #### Success Response (200) - **order_list** (array) - A list of order objects. - **unique_reference** (string) - A unique identifier for the order. - **status** (string) - The current status of the order. - **created_at** (string) - Timestamp when the order was created. #### Response Example ```json { "order_list": [ { "unique_reference": "ORD123456789", "status": "COMPLETED", "created_at": "2023-10-27T09:00:00Z" } ] } ``` ## GET /orders/{unique_reference}/ ### Description Retrieves detailed information for a specific order. ### Method GET ### Endpoint /orders/{unique_reference}/ ### Parameters #### Path Parameters - **unique_reference** (string) - Required - The unique reference of the order to retrieve. ### Response #### Success Response (200) - **order** (object) - Detailed information about the order. - **unique_reference** (string) - A unique identifier for the order. - **status** (string) - The current status of the order. - **deposit_currency** (string) - The currency being received. - **withdraw_currency** (string) - The currency being sent. - **deposit_amount** (string) - The amount of the receiving currency. - **withdraw_amount** (string) - The amount of the sending currency. - **rate** (string) - The exchange rate applied. - **fee** (string) - The transaction fee. - **created_at** (string) - Timestamp when the order was created. - **expires_at** (string) - Timestamp when the order expires. - **deposit_transaction** (string) - Transaction ID for the deposit. - **withdraw_transaction** (string) - Transaction ID for the withdrawal. #### Response Example ```json { "order": { "unique_reference": "ORD123456789", "status": "COMPLETED", "deposit_currency": "USDT", "withdraw_currency": "BTC", "deposit_amount": "100", "withdraw_amount": "0.004", "rate": "25000", "fee": "0.5", "created_at": "2023-10-27T09:00:00Z", "expires_at": "2023-10-27T09:15:00Z", "deposit_transaction": "txid123", "withdraw_transaction": "txid456" } } ``` ## PATCH /orders/{unique_reference}/ ### Description Updates an existing order. Currently supports cancellation. ### Method PATCH ### Endpoint /orders/{unique_reference}/ ### Parameters #### Path Parameters - **unique_reference** (string) - Required - The unique reference of the order to update. #### Request Body - **status** (string) - Required - The new status to set for the order. Use "CANCELLED" to cancel the order. ### Request Example ```json { "status": "CANCELLED" } ``` ### Response #### Success Response (200) - **order** (object) - Details of the updated order. - **unique_reference** (string) - A unique identifier for the order. - **status** (string) - The updated status of the order. #### Response Example ```json { "order": { "unique_reference": "ORD123456789", "status": "CANCELLED" } } ``` ``` -------------------------------- ### Currency Operations Source: https://api.n.exchange/docs/v2/index Endpoints for retrieving information about supported currencies and networks. ```APIDOC ## GET /currency/ ### Description Lists all supported currencies. ### Method GET ### Endpoint /currency/ ### Parameters #### Query Parameters - **format** (string) - Optional - Specifies the output format for currency details (e.g., 'object' for structured format). ### Response #### Success Response (200) - **currency_list** (array) - A list of currency objects. - **code** (string) - The currency code (e.g., "USDTERC"). - **name** (string) - The full name of the currency. - **common_symbol** (string) - The common symbol for external exchange mappings. - **networks** (array) - List of networks the currency is available on. #### Response Example ```json { "currency_list": [ { "code": "BTC", "name": "Bitcoin", "common_symbol": "BTC", "networks": ["BTC"] }, { "code": "USDTERC", "name": "Tether (ERC20)", "common_symbol": "USDT", "networks": ["ETH"] } ] } ``` ## GET /currency/{code}/ ### Description Retrieves detailed information for a specific currency. ### Method GET ### Endpoint /currency/{code}/ ### Parameters #### Path Parameters - **code** (string) - Required - The currency code to retrieve details for. ### Response #### Success Response (200) - **code** (string) - The currency code. - **name** (string) - The full name of the currency. - **common_symbol** (string) - The common symbol for external exchange mappings. - **networks** (array) - List of networks the currency is available on. #### Response Example ```json { "code": "BTC", "name": "Bitcoin", "common_symbol": "BTC", "networks": ["BTC"] } ``` ## GET /network/ ### Description Lists all supported networks. ### Method GET ### Endpoint /network/ ### Response #### Success Response (200) - **network_list** (array) - A list of network objects. - **name** (string) - The name of the network (e.g., "ETH"). #### Response Example ```json { "network_list": [ {"name": "BTC"}, {"name": "ETH"} ] } ``` ## GET /network/{name}/ ### Description Retrieves details for a specific network. ### Method GET ### Endpoint /network/{name}/ ### Parameters #### Path Parameters - **name** (string) - Required - The name of the network to retrieve details for. ### Response #### Success Response (200) - **name** (string) - The name of the network. #### Response Example ```json { "name": "ETH" } ``` ``` -------------------------------- ### Pair Operations Source: https://api.n.exchange/docs/v2/index Endpoints for retrieving information about currency pairs. ```APIDOC ## GET /pair/ ### Description Lists all available currency pairs for exchange. ### Method GET ### Endpoint /pair/ ### Response #### Success Response (200) - **pair_list** (array) - A list of currency pair objects. - **name** (string) - The name of the pair (e.g., "BTC-USDTERC"). - **from_currency** (object) - Details of the currency to send. - **code** (string) - Currency code. - **network** (string) - Network for the currency. - **to_currency** (object) - Details of the currency to receive. - **code** (string) - Currency code. - **network** (string) - Network for the currency. #### Response Example ```json { "pair_list": [ { "name": "BTC-USDTERC", "from_currency": {"code": "BTC", "network": "BTC"}, "to_currency": {"code": "USDT", "network": "ETH"} } ] } ``` ## GET /pair/{name}/ ### Description Retrieves details for a specific currency pair. ### Method GET ### Endpoint /pair/{name}/ ### Parameters #### Path Parameters - **name** (string) - Required - The name of the currency pair (e.g., "BTC-USDTERC"). ### Response #### Success Response (200) - **name** (string) - The name of the pair. - **from_currency** (object) - Details of the currency to send. - **code** (string) - Currency code. - **network** (string) - Network for the currency. - **to_currency** (object) - Details of the currency to receive. - **code** (string) - Currency code. - **network** (string) - Network for the currency. #### Response Example ```json { "name": "BTC-USDTERC", "from_currency": {"code": "BTC", "network": "BTC"}, "to_currency": {"code": "USDT", "network": "ETH"} } ``` ``` -------------------------------- ### Rate Operations Source: https://api.n.exchange/docs/v2/index Endpoints for fetching exchange rates. ```APIDOC ## GET /rate/ ### Description Retrieves current exchange rates for currency pairs. ### Method GET ### Endpoint /rate/ ### Parameters #### Query Parameters - **pair** (string) - Optional - Filter rates by a specific currency pair (e.g., "BTC-USDTERC"). - **from_currency** (string) - Optional - Filter rates by the currency to send. - **to_currency** (string) - Optional - Filter rates by the currency to receive. ### Response #### Success Response (200) - **rate_list** (array) - A list of exchange rate objects. - **pair** (string) - The currency pair. - **rate** (string) - The current exchange rate. - **min_deposit_amount** (string) - Minimum amount that can be deposited. - **max_deposit_amount** (string) - Maximum amount that can be deposited. - **min_withdraw_amount** (string) - Minimum amount that can be withdrawn. - **max_withdraw_amount** (string) - Maximum amount that can be withdrawn. - **fixed_rate_deadline** (string) - Timestamp when the rate expires. #### Response Example ```json { "rate_list": [ { "pair": "BTC-USDTERC", "rate": "0.000025", "min_deposit_amount": "0.0001", "max_deposit_amount": "10", "min_withdraw_amount": "0.00005", "max_withdraw_amount": "5", "fixed_rate_deadline": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Risk Operations Source: https://api.n.exchange/docs/v2/index Endpoints for pre-screening order eligibility and assessing risk. ```APIDOC ## POST /pre_screening/ ### Description Pre-screens an order to check its eligibility and potential risks before creation. ### Method POST ### Endpoint /pre_screening/ ### Parameters #### Request Body - **pair** (string) - Required - The currency pair for the potential order (e.g., "BTC-USDTERC"). - **side** (string) - Required - The direction of the potential order, either "BUY" or "SELL". - **deposit_amount** (string) - Required if side is "BUY" - The potential amount of the receiving currency. - **withdraw_amount** (string) - Required if side is "SELL" - The potential amount of the sending currency. ### Request Example ```json { "pair": "BTC-USDTERC", "side": "BUY", "deposit_amount": "100" } ``` ### Response #### Success Response (200) - **pre_screening** (object) - The result of the pre-screening. - **eligible** (boolean) - Indicates if the order is eligible. - **message** (string) - A message providing details about the eligibility or any issues found. - **estimated_rate** (string) - The estimated exchange rate if eligible. - **min_deposit_amount** (string) - Minimum deposit amount if eligible. - **max_deposit_amount** (string) - Maximum deposit amount if eligible. - **min_withdraw_amount** (string) - Minimum withdrawal amount if eligible. - **max_withdraw_amount** (string) - Maximum withdrawal amount if eligible. #### Response Example ```json { "pre_screening": { "eligible": true, "message": "Order is eligible for processing.", "estimated_rate": "25000", "min_deposit_amount": "10", "max_deposit_amount": "10000", "min_withdraw_amount": "0.0004", "max_withdraw_amount": "0.4" } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.