### Example Ripio API GET Request Source: https://apidocs.ripio.com/static/api/overview An example of a GET request to the Ripio API, specifically fetching the public server time from the trade service. This illustrates the practical application of the API usage pattern. ```shell curl -X GET https://api.ripio.com/trade/public/server-time ``` -------------------------------- ### API Examples Source: https://apidocs.ripio.com/static/api/authentication Provides links to functional examples of API authentication in multiple programming languages available on the Ripio GitHub repository. ```APIDOC ## Examples We provide functional examples of API authentication in multiple programming languages. You can find them in our GitHub repository: [https://github.com/ripio/api/tree/main/authentication](https://github.com/ripio/api/tree/main/authentication) ``` -------------------------------- ### Data Structures and Examples Source: https://apidocs.ripio.com/pages/trade/ticker/get_ticker___ticker_by_pair This section outlines the data structures and provides examples for the API responses, focusing on the 'data' object which contains cryptocurrency trading information. ```APIDOC ## Data Structures and Examples ### Description This section details the structure of the 'data' object returned by the API, which includes cryptocurrency trading information such as prices, volumes, and price changes. It also shows the structure for error handling. ### Method N/A (This section describes data structures, not a specific endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response (Example Structure) - **data** (object) - Contains cryptocurrency trading information. - **ask** (number) - The current ask price. - **base_code** (string) - The code of the base currency. - **base_id** (string) - The ID of the base currency. - **bid** (number) - The current bid price. - **date** (string) - The timestamp of the data. - **first** (number) - The first price in the period. - **high** (number) - The highest price in the period. - **is_frozen** (boolean) - Indicates if the trading pair is frozen. - **last** (number) - The last traded price. - **low** (number) - The lowest price in the period. - **pair** (string) - The trading pair (e.g., BTC_BRL). - **price_change_percent_24h** (string) - The percentage price change in the last 24 hours. - **quote_id** (string) - The ID of the quote currency. - **quote_code** (string) - The code of the quote currency. - **quote_volume** (number) - The volume in the quote currency. - **trades_quantity** (number) - The number of trades in the period. - **volume** (number) - The volume in the base currency. - **error_code** (number) - An error code (null if successful). - **message** (string) - An error message (null if successful). #### Response Example ```json { "data": { "ask": 95629, "base_code": "BTC", "base_id": "9A5E2EF4-9547-418A-8EC6-C6EADBB8B32F", "bid": 94171, "date": "2022-11-11T01:31:35.820Z", "first": 98444, "high": 98444, "is_frozen": false, "last": 94311, "low": 85034, "pair": "BTC_BRL", "price_change_percent_24h": "-12", "quote_id": "48898138-8623-4555-9468-B1A1505A9352", "quote_code": "BRL", "quote_volume": 150.1, "trades_quantity": 1199, "volume": 27.26776846 }, "error_code": null, "message": null } ``` #### Error Response Example ```json { "data": null, "error_code": 500, "message": "Internal Server Error" } ``` ``` -------------------------------- ### Limit Buy Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create a limit buy order. It includes essential parameters like API token, timestamp, signature, trading pair, side, type, amount, and price. ```json { "id": "req-001", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "BTC_BRL", "side": "buy", "type": "limit", "amount": 0.001, "price": 100000, "external_id": "my-order-123" } } ``` -------------------------------- ### Response Examples Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Examples of success and error responses from the API. ```APIDOC ## Response Examples ### Success Response Example ```json { "id": "req-001", "status": 200, "result": { "id": "7155ED34-9EC4-4733-8B32-1E4319CB662F", "status": "open", "create_date": "2024-03-27T13:27:19.853Z", "external_id": "my-order-123", "pair": "BTC_BRL", "side": "buy", "executed_amount": 0, "remaining_amount": 0.001, "remaining_value": 100, "requested_amount": 0.001, "requested_value": 100 } } ``` ### Error Response Example ```json { "id": "req-001", "status": 400, "result": null, "error": { "error_code": 40011, "message": "Insufficient funds." } } ``` ``` -------------------------------- ### Basic Information API Source: https://apidocs.ripio.com/llms.txt Welcome to the Ripio Trade API documentation, providing basic information for getting started. ```APIDOC ## Basic Information ### Description Welcome to the Ripio Trade API documentation. This section provides basic information to help you get started with the trade API. ### Method N/A (Documentation) ### Endpoint N/A (Documentation) ### Parameters None ### Request Example None ### Response (This section provides introductory information about the Ripio Trade API.) ``` -------------------------------- ### Market Sell Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create a market sell order. This type of order is executed immediately at the best available market price. It requires parameters like API token, timestamp, signature, trading pair, side, type, amount, and value. ```json { "id": "req-002", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "ETH_BRL", "side": "sell", "type": "market", "amount": 0.1, "value": 1000 } } ``` -------------------------------- ### Ceiling Buy Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create a ceiling buy order. This order type allows buying up to a specified value, with an option to fill or kill. It includes parameters like API token, timestamp, signature, trading pair, side, type, value, external ID, and fill_or_kill flag. ```json { "id": "req-009", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "BTC_BRL", "side": "buy", "type": "ceiling", "value": 50000, "external_id": "ceiling-buy-606", "fill_or_kill": false } } ``` -------------------------------- ### Fetch Documentation Index (HTTP GET) Source: https://apidocs.ripio.com/static/trade/websocket_api/response_format This snippet demonstrates how to fetch the complete documentation index for the Ripio LLM API using an HTTP GET request. No specific client libraries are required, only a standard HTTP client. ```http GET https://apidocs.ripio.com/llms.txt ``` -------------------------------- ### Trailing Buy Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create a trailing buy order. This order type follows the market price with a specified distance, aiming to buy at a favorable price. It includes parameters like API token, timestamp, signature, trading pair, side, type, amount, price, and distance. ```json { "id": "req-007", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "BTC_BRL", "side": "buy", "type": "trailing", "amount": 1, "price": 700000, "distance": 5000, "external_id": "trailing-buy-404" } } ``` -------------------------------- ### Cryptocurrency Deposit Notification Example (JSON) Source: https://apidocs.ripio.com/static/trade/websocket_stream/deposit An example of a real-time notification received when a cryptocurrency deposit is confirmed. It includes details such as deposit ID, amount, currency, transaction hash, and network information. ```json { "id": 10, "topic": "deposit", "timestamp": 1673271591764, "body": { "id": "08799ECC-F6B1-498E-B89C-2A05E6A181B9", "user_id": "5B6A43AE-8012-402D-966F-87CF64689535", "amount": 1, "currency_code": "ETH", "status": "confirmed", "is_internal": false, "hash": "0x79704c92b31061b8f51e26486d6454aff3e3c58aa0d51f0f803d6fd063be8100", "address": "3PQhyXH1EZs1bZ23ZafqQDyeViqxn5KdXN", "network": "ethereum", "create_date": "2023-01-09T13:39:24.057Z", "update_date": "2023-01-09T13:39:25.001Z", "confirmation_date": "2023-01-09T13:39:25.001Z" } } ``` -------------------------------- ### GET /tickers Source: https://apidocs.ripio.com/pages/trade/public/get_public___tickers Fetches a 24-hour window statistics for all cryptocurrency pairs. ```APIDOC ## GET /tickers ### Description Returns a 24 hour window statistics for all pairs. ### Method GET ### Endpoint /tickers ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **symbol** (string) - The trading pair symbol. - **last_price** (number) - The last traded price. - **lowest_ask** (number) - The lowest ask price. - **highest_bid** (number) - The highest bid price. - **percent_change** (number) - The percentage change in price over the last 24 hours. - **base_volume** (number) - The trading volume in the base currency over the last 24 hours. - **quote_volume** (number) - The trading volume in the quote currency over the last 24 hours. - **isFrozen** (boolean) - Indicates if trading is frozen for this pair. - **high** (number) - The highest price over the last 24 hours. - **low** (number) - The lowest price over the last 24 hours. #### Response Example ```json [ { "symbol": "BTC/USDT", "last_price": 50000.00, "lowest_ask": 50001.00, "highest_bid": 49999.00, "percent_change": 0.05, "base_volume": 1000.00, "quote_volume": 50000000.00, "isFrozen": false, "high": 51000.00, "low": 49000.00 } ] ``` ``` -------------------------------- ### Stop Limit Buy Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create a stop limit buy order. This order type triggers a limit order when a specified stop price is reached. It includes parameters like API token, timestamp, signature, trading pair, side, type, amount, price, and stop price. ```json { "id": "req-005", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "BTC_BRL", "side": "buy", "type": "stop_limit", "amount": 1, "price": 700000, "stop_price": 650000, "external_id": "stop-buy-202" } } ``` -------------------------------- ### Iceberg Buy Order Example Source: https://apidocs.ripio.com/static/trade/websocket_api/create_order Example of a JSON request to create an iceberg buy order. This order type displays only a small portion of the order at a time to minimize market impact. It includes parameters like API token, timestamp, signature, trading pair, side, type, amount, step amount, price, and external ID. ```json { "id": "req-011", "method": "order.create", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "pair": "BTC_BRL", "side": "buy", "type": "iceberg", "amount": 10, "step_amount": 1, "price": 700000, "external_id": "iceberg-buy-808" } } ``` -------------------------------- ### GET /v1/ticker/:pair Source: https://apidocs.ripio.com/pages/trade/ticker/get_ticker___ticker_by_pair Fetches 24-hour window statistics for a given trading pair. ```APIDOC ## GET /v1/ticker/:pair ### Description Returns a 24 hour window statistics for a given pair. ### Method GET ### Endpoint /v1/ticker/:pair ### Parameters #### Path Parameters - **pair** (string) - Required - The trading pair for which to retrieve statistics (e.g., BTCUSD). ### Request Example ``` GET /v1/ticker/BTCUSD ``` ### Response #### Success Response (200) - **last** (float) - The last trade price. - **low** (float) - The lowest trade price in the 24 hour window. - **high** (float) - The highest trade price in the 24 hour window. - **vol** (float) - The volume of trades in the 24 hour window. - **buy** (float) - The highest bid price. - **sell** (float) - The lowest ask price. - **open** (float) - The opening price for the 24 hour window. - **at** (integer) - The Unix timestamp of the data. #### Response Example ```json { "last": 30000.00, "low": 29500.00, "high": 30500.00, "vol": 1000.00, "buy": 30005.00, "sell": 30010.00, "open": 29800.00, "at": 1678886400 } ``` ``` -------------------------------- ### WebSocket API Request and Signature Body Examples (JSON) Source: https://apidocs.ripio.com/static/trade/websocket_api/authentication These JSON examples illustrate the structure of a request to the Ripio WebSocket API and the specific body content used for signature generation. The 'Request to send' includes all parameters, while the 'Body to sign' contains only the essential business parameters, excluding authentication details. ```json { "id": "req-001", "method": "order.create", "params": { "pair": "BTC_BRL", "side": "buy", "type": "limit", "amount": 0.001, "price": 100000, "apiToken": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature" } } ``` ```json { "pair": "BTC_BRL", "side": "buy", "type": "limit", "amount": 0.001, "price": 100000 } ``` -------------------------------- ### How to Subscribe to Topics (WebSocket Stream) Source: https://apidocs.ripio.com/llms.txt Explains the process of subscribing to various topics offered by the Ripio WebSocket Stream service, which provides real-time market data. ```text To receive real-time updates, establish a WebSocket connection and send subscription messages for the desired topics. For example, to subscribe to 'ticker@BTCUSD', send a JSON message specifying the topic and event type. ``` -------------------------------- ### Get Server Time (OpenAPI) Source: https://apidocs.ripio.com/pages/trade/public/get_public___server_time This OpenAPI specification defines the GET /trade/public/server-time endpoint, which returns the server time in milliseconds. It includes details on the request, responses, and data structure. ```yaml openapi: 3.0.0 info: title: Ripio Gateway description: Ripio API - Services documentation. version: 0.1.0 x-logo: url: https://cwstatic.nyc3.digitaloceanspaces.com/1996/bitcointrade.png servers: - url: https://api.ripio.com description: Production environment security: [] paths: /trade/public/server-time: get: tags: - Ripio Trade summary: Public - Server Time description: Returns the server time in miliseconds. parameters: [] responses: '200': description: '' content: application/json: schema: description: Ok properties: message: type: string data: properties: timestamp: type: number required: - timestamp type: object required: - message - data type: object example: data: timestamp: 1670004661380 message: null ``` -------------------------------- ### How to Subscribe to Topics (WebSocket Stream) Source: https://apidocs.ripio.com/llms.txt Explains how to subscribe to topics for the WebSocket Stream service, which provides real-time market data. ```APIDOC ## How to Subscribe to Topics ### Description Our websocket stream service provides real time updates about market data via websocket protocol. This section explains how to subscribe to various topics. ### Method SUBSCRIBE (via WebSocket message) ### Endpoint N/A (WebSocket Stream) ### Parameters To subscribe to a topic, send a JSON message with the following structure: - **op**: "subscribe" - **args**: An array containing the topic(s) to subscribe to. ### Request Example ```json { "op": "subscribe", "args": ["ticker@BTC/USD", "trade@BTC/USD"] } ``` ### Response (Successful subscription will result in receiving data messages for the subscribed topics.) ``` -------------------------------- ### Fiat Deposit Notification Example (JSON) Source: https://apidocs.ripio.com/static/trade/websocket_stream/deposit An example of a real-time notification for a fiat deposit, likely an internal transfer. It includes deposit ID, amount, currency, and status, with fields like hash and address being null. ```json { "id": 11, "topic": "deposit", "timestamp": 1673271591764, "body": { "id": "08799ECC-F6B1-498E-B89C-2A05E6A181B9", "user_id": "5B6A43AE-8012-402D-966F-87CF64689535", "amount": 1000, "currency_code": "BRL", "status": "confirmed", "is_internal": true, "hash": null, "address": null, "network": null, "create_date": "2023-01-09T13:39:24.057Z", "update_date": "2023-01-09T13:39:25.001Z", "confirmation_date": "2023-01-09T13:39:25.001Z" } } ``` -------------------------------- ### API Usage Source: https://apidocs.ripio.com/static/api/overview Demonstrates how to construct API requests using the service path and endpoint path, with an example using curl. ```APIDOC ## API Usage ### Description Use the service path in combination with the endpoint path to redirect requests to the desired API. ### Method Any HTTP method (GET, POST, PUT, DELETE, etc.) ### Endpoint `https://api.ripio.com/:service/:path` ### Request Example ```shell curl -X GET https://api.ripio.com/trade/public/server-time ``` ``` -------------------------------- ### Get User Wallet Address (OpenAPI) Source: https://apidocs.ripio.com/pages/trade/wallets/get_wallets___get_user_wallet This OpenAPI definition describes the GET /trade/wallets/{currency_code}/{network} endpoint. It allows users to retrieve their currency address for a specific network. Required headers include authorization, signature, and timestamp. ```yaml openapi: 3.0.0 info: title: Ripio Gateway description: Ripio API - Services documentation. version: 0.1.0 x-logo: url: https://cwstatic.nyc3.digitaloceanspaces.com/1996/bitcointrade.png servers: - url: https://api.ripio.com description: Production environment security: [] paths: /trade/wallets/{currency_code}/{network}: get: tags: - Ripio Trade summary: Wallets - Get User Wallet description: Get user network's currency address parameters: - in: path name: currency_code required: true description: Currency code schema: example: BTC type: string - in: path name: network required: true description: Network schema: example: bitcoin type: string - in: header name: authorization required: true description: The API key as a string. schema: type: string - in: header name: signature required: true description: >- See the [Generating Signature](/static/api/authentication#generating-signature) section for more details. schema: type: string - in: header name: timestamp required: true description: >- A timestamp in milliseconds. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. schema: type: number - in: header name: timstamp-tolerance required: false description: >- An additional, non-required parameter, that you can send to specify the number of milliseconds after the timestamp for the request to be valid. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. schema: type: number responses: '200': description: '' content: application/json: schema: description: Ok properties: data: properties: address: description: Address type: string currency_code: description: Currency code type: string example: BTC tag: description: >- Address tag - Check the information about this currency in the public currencies endpoint to check if this currency / network needs tag for deposits type: string memo: description: >- Address memo - Check the information about this currency in the public currencies endpoint to check if this currency / network needs memo for deposits type: string network: description: Network type: string required: - address - currency_code - tag - memo - network type: object error_code: type: number example: null message: type: string example: null required: - data - error_code - message type: object ``` -------------------------------- ### Overview API Source: https://apidocs.ripio.com/llms.txt Provides a general overview of the Ripio API. ```APIDOC ## Overview ### Description General overview of the Ripio API, including its capabilities and structure. ### Method N/A (Documentation) ### Endpoint N/A (Documentation) ### Parameters None ### Request Example None ### Response (This section provides general information about the API.) ``` -------------------------------- ### Documentation Index Source: https://apidocs.ripio.com/pages/trade/orders/post_orders___cancel_order Fetches the complete documentation index to discover all available API pages. ```APIDOC ## GET /llms.txt ### Description Fetches the complete documentation index for the Ripio LLMs API. This index can be used to discover all available API pages before exploring further. ### Method GET ### Endpoint /llms.txt ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **documentation_index** (string) - A URL pointing to the complete documentation index file. #### Response Example { "documentation_index": "https://apidocs.ripio.com/llms.txt" } ``` -------------------------------- ### Update Order Request Examples (JSON) Source: https://apidocs.ripio.com/static/trade/websocket_api/update_order Provides examples of JSON requests to update an order's price and/or amount via the WebSocket API. It demonstrates updating both fields, only the price, or only the amount. Requires authentication parameters and the order ID. ```json { "id": "req-005", "method": "order.update", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "order_id": "7155ED34-9EC4-4733-8B32-1E4319CB662F", "price": 105000, "amount": 0.002 } } ``` ```json { "id": "req-006", "method": "order.update", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "order_id": "7155ED34-9EC4-4733-8B32-1E4319CB662F", "price": 110000 } } ``` ```json { "id": "req-007", "method": "order.update", "params": { "api_token": "your-api-token", "timestamp": 1634567890000, "signature": "calculated-signature", "order_id": "7155ED34-9EC4-4733-8B32-1E4319CB662F", "amount": 0.003 } } ``` -------------------------------- ### Authentication API Source: https://apidocs.ripio.com/llms.txt Provides a tutorial for authenticating with the Ripio API using API Token, Secret, and Timestamp-based signature generation. ```APIDOC ## Authentication Tutorial ### Description A tutorial for using the Ripio API. Authentication is performed using API Token, Secret, and Timestamp-based signature generation. ### Method N/A (Documentation) ### Endpoint N/A (Documentation) ### Parameters - **API Token**: Your unique API token. - **API Secret**: Your secret API key. - **Timestamp**: The current Unix timestamp. - **Signature**: A signature generated using your API Secret, Timestamp, and the request details. ### Request Example (Refer to specific endpoint documentation for request structure and signature generation details) ### Response (Authentication is typically handled via headers. Successful authentication grants access to API endpoints.) ``` -------------------------------- ### Create Order Source: https://apidocs.ripio.com/pages/trade/orders/post_orders___create_order Creates a new order and publishes updates to various websocket topics. ```APIDOC ## POST /orders ### Description Creates a new order. Publishes updates in the following websocket topics: [`trade`](#operation/trade) (if there is a trade), [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status). ### Method POST ### Endpoint /orders ### Parameters #### Request Body - **symbol** (string) - Required - The trading symbol for the order. - **side** (string) - Required - The side of the order (e.g., 'buy' or 'sell'). - **type** (string) - Required - The type of order (e.g., 'limit' or 'market'). - **quantity** (number) - Required - The amount of the asset to trade. - **price** (number) - Optional - The price for limit orders. ### Request Example ```json { "symbol": "BTCUSD", "side": "buy", "type": "limit", "quantity": 0.001, "price": 50000 } ``` ### Response #### Success Response (201) - **orderId** (string) - The unique identifier for the created order. - **status** (string) - The current status of the order. #### Response Example ```json { "orderId": "ord_12345abcde", "status": "open" } ``` ``` -------------------------------- ### Get Public Currencies - OpenAPI Specification Source: https://apidocs.ripio.com/pages/trade/public/get_public___currencies This OpenAPI specification defines the GET /trade/public/currencies endpoint. It allows retrieval of active currencies available on the platform, with optional filtering by currency code or country. The response includes detailed information about each currency, such as its active status, deposit/withdrawal capabilities, and supported networks. ```yaml openapi: 3.0.0 info: title: Ripio Gateway description: Ripio API - Services documentation. version: 0.1.0 x-logo: url: https://cwstatic.nyc3.digitaloceanspaces.com/1996/bitcointrade.png servers: - url: https://api.ripio.com description: Production environment security: [] paths: /trade/public/currencies: get: tags: - Ripio Trade summary: Public - Currencies description: Lists the active currencies available in the platform. parameters: - in: query name: currency_code required: false description: Currency code schema: type: string - in: query name: countries required: false description: Countries (One or many, use "," to separate) schema: example: BR,AR type: string responses: '200': description: '' content: application/json: schema: description: Ok properties: data: items: properties: active: description: Whether the currency is currently active for trading type: boolean can_deposit: description: Whether deposits are enabled for this currency type: boolean can_withdraw: description: Whether withdrawals are enabled for this currency type: boolean code: description: Currency code type: string example: BTC id: description: Currency id type: string min_withdraw_amount: description: Minimum withdrawal amount type: number name: description: Currency name type: string needs_block_id_for_tx_sync: description: >- Whether the currency requires a block ID for transaction synchronization type: boolean networks: description: >- Supported networks for the currency (undefined for fiduciary currency) items: properties: code: description: Network code type: string memo: properties: deposit: description: >- Flag that indicates if the network has memo for deposit type: boolean withdrawal: description: >- Flag that indicates if the network has memo for withdrawal type: boolean required: - deposit - withdrawal type: object tag: properties: deposit: description: >- Flag that indicates if the network has tag for deposit type: boolean withdrawal: description: >- Flag that indicates if the network has tag for withdrawal type: boolean required: - deposit - withdrawal type: object required: - code - memo - tag type: object type: array precision: description: Currency decimal places type: number logo: properties: ``` -------------------------------- ### Order Data Structure Source: https://apidocs.ripio.com/pages/trade/orders/post_orders___cancel_order This section details the structure of an order object, including its various fields and their types. It also provides an example of a typical order response. ```APIDOC ## Order Data Structure ### Description This describes the structure of an order object, including fields like `price`, `update_date`, `pair`, and detailed information about the order's execution and status. ### Fields - **price** (number) - The price of the order. - **update_date** (string) - The date and time when the order was last updated. - **pair** (string) - The trading pair for the order (e.g., BTC_BRL). - **create_date** (string) - The date and time when the order was created. - **executed_amount** (number) - The amount of the order that has been executed. - **external_id** (string) - An external identifier for the order. - **id** (string) - The unique identifier for the order. - **remaining_amount** (number) - The remaining amount of the order to be executed. - **remaining_value** (number) - The remaining value of the order. - **requested_amount** (number) - The originally requested amount for the order. - **requested_value** (number) - The originally requested value for the order. - **side** (string) - The side of the order (e.g., 'buy', 'sell'). - **status** (string) - The current status of the order (e.g., 'canceled'). - **total_value** (number) - The total value of the order. - **type** (string) - The type of order (e.g., 'limit'). - **error_code** (number) - An error code associated with the order, if any. - **message** (string) - A message associated with the order, if any. ### Example Response ```json { "data": { "price": 42600, "update_date": "2017-12-13T21:48:48.817Z", "pair": "BTC_BRL", "create_date": "2017-12-08T23:42:54.960Z", "executed_amount": 0.02347418, "external_id": "B4A9F7F4-9C79-4921-9330-224C17260BDF", "id": "7155ED34-9EC4-4733-8B32-1E4319CB662F", "remaining_amount": 0.1, "remaining_value": 0.6, "requested_amount": 0.02347418, "requested_value": 1000, "side": "buy", "status": "canceled", "total_value": 1000, "type": "limit" }, "error_code": null, "message": null } ``` ### Required Fields - `data` - `error_code` - `message` ``` -------------------------------- ### GET /trade/withdrawals Source: https://apidocs.ripio.com/pages/trade/cryptocurrency%20withdrawals/get_cryptocurrency_withdrawals___list_cryptocurrency_withdrawals Lists the user's cryptocurrency withdrawals. This endpoint uses cursor-based pagination. ```APIDOC ## GET /trade/withdrawals ### Description Lists the user's cryptocurrency withdrawals. This endpoint uses cursor-based pagination. **Attention:** Due to performance concerns, this endpoint now uses cursor-based pagination. The pagination object currently included in the response is now a placeholder and will be entirely removed as of 2026-06-01. The parameter current_page is also a placeholder and will be removed at the same time. Please update your integration accordingly and refer to the documentation for the correct pagination handling. ### Method GET ### Endpoint /trade/withdrawals ### Parameters #### Query Parameters - **currency_code** (string) - Optional - Currency code - **status** (string) - Optional - Withdrawal status - **start_date** (string) - Optional - Initial date filter in ISO-8601 format - **end_date** (string) - Optional - Final date filter in ISO-8601 format - **page_size** (number) - Optional - Number of records per page - **current_page** (number) - Optional - Page number for pagination - **network** (string) - Optional - Network - **c** (string) - Optional - The `c` parameter is the cursor you should use to fetch the next page of results #### Header Parameters - **authorization** (string) - Required - The API key as a string. - **signature** (string) - Required - See the [Generating Signature](/static/api/authentication#generating-signature) section for more details. - **timestamp** (number) - Required - A timestamp in milliseconds. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. - **timstamp-tolerance** (number) - Optional - An additional, non-required parameter, that you can send to specify the number of milliseconds after the timestamp for the request to be valid. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. ### Response #### Success Response (200) - **data** (object) - Contains withdrawal data. - **withdrawals** (array) - List of withdrawals. - **amount** (number) - Amount - **create_date** (string) - Datetime of the creation - **currency_code** (string) - Currency code - **destination_address** (string) - Destination address - **external_id** (string) - External ID #### Response Example { "data": { "withdrawals": [ { "amount": 0.1, "create_date": "2019-01-25T16:37:15.443Z", "currency_code": "BTC", "destination_address": "rw9nf3WgsagJiZnkAeZzXZuqeCQ6LHm2h1", "external_id": "some_external_id" } ] } } ``` -------------------------------- ### Construct Ripio API Request Source: https://apidocs.ripio.com/static/api/overview Demonstrates how to construct a request to the Ripio API by combining the service path and endpoint path. This method ensures requests are directed to the desired API service. ```shell METHOD https://api.ripio.com/:service/:path ``` -------------------------------- ### GET /trade/deposits Source: https://apidocs.ripio.com/pages/trade/cryptocurrency%20deposits/get_cryptocurrency_deposits___list_cryptocurrency_deposits Lists the user's cryptocurrency deposits. This endpoint uses cursor-based pagination. ```APIDOC ## GET /trade/deposits ### Description Lists the user's cryptocurrency deposits. This endpoint uses cursor-based pagination. Please note that the `pagination` object and `current_page` parameter are placeholders and will be removed in future versions. Refer to the documentation for correct pagination handling. ### Method GET ### Endpoint /trade/deposits ### Parameters #### Query Parameters - **currency_code** (string) - Optional - Currency code (e.g., BTC) - **status** (string) - Optional - Deposit status - **start_date** (string) - Optional - Initial date filter in ISO-8601 format - **end_date** (string) - Optional - Final date filter in ISO-8601 format - **page_size** (number) - Optional - Number of records per page (e.g., 100) - **current_page** (number) - Optional - Page number for pagination (e.g., 3) - **network** (string) - Optional - Network (e.g., bitcoin) - **c** (string) - Optional - The cursor for fetching the next page of results #### Path Parameters None #### Request Body None #### Headers - **authorization** (string) - Required - The API key as a string. - **signature** (string) - Required - See the [Generating Signature](/static/api/authentication#generating-signature) section for more details. - **timestamp** (number) - Required - A timestamp in milliseconds. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. - **timstamp-tolerance** (number) - Optional - An additional parameter to specify the number of milliseconds after the timestamp for the request to be valid. See the [Timestamp Security](/static/api/authentication#timestamp-security) section for more details. ### Request Example None ### Response #### Success Response (200) - **data** (object) - Contains deposit information. - **deposits** (array) - List of deposit objects. - **id** (string) - Deposit identifier. - **currency_code** (string) - Currency code (e.g., BTC). - **hash** (string) - Deposit hash. - **amount** (number) - Amount. - **status** (string) - Deposit status. - **create_date** (string) - Datetime of the creation. #### Response Example ```json { "data": { "deposits": [ { "id": "deposit-123", "currency_code": "BTC", "hash": "transaction-hash-abc", "amount": 0.5, "status": "confirmed", "create_date": "2023-10-27T10:00:00Z" } ] } } ``` ``` -------------------------------- ### GET /trades Source: https://apidocs.ripio.com/pages/trade/orders/get_orders___trades Retrieves a list of historical trades. This endpoint supports pagination through cursor parameters. ```APIDOC ## GET /trades ### Description Retrieves a list of historical trades. This endpoint supports pagination through cursor parameters. ### Method GET ### Endpoint /trades ### Query Parameters - **c** (string) - Optional - Cursor for pagination. Use `nc` from a previous response to get the next page, or `pc` to get the previous page. ### Response #### Success Response (200) - **data** (object) - Contains the trade data and pagination cursors. - **trades** (array) - An array of trade objects. - **amount** (number) - The amount of the base currency traded. - **date** (string) - The ISO 8601 timestamp of the trade. - **id** (string) - The unique identifier for the trade. - **maker_order_id** (string) - The ID of the order that was the maker. - **maker_side** (string) - The side of the trade for the maker (buy or sell). - **maker_type** (string) - The type of the maker's order (limit or market). - **pair** (string) - The trading pair (e.g., BTC_BRL). - **price** (number) - The price at which the trade occurred. - **taker_order_id** (string) - The ID of the order that was the taker. - **taker_side** (string) - The side of the trade for the taker (buy or sell). - **taker_type** (string) - The type of the taker's order (limit or market). - **timestamp** (number) - The Unix timestamp of the trade. - **total_value** (number) - The total value of the trade in the quote currency. - **nc** (string) - Optional - The next cursor for pagination. - **pc** (string) - Optional - The previous cursor for pagination. - **error_code** (number) - An error code (null if successful). - **message** (string) - A message indicating the status (null if successful). #### Response Example ```json { "data": { "trades": [ { "amount": 0.2404764, "date": "2019-01-03T02:27:33.947Z", "id": "2B222F22-5235-45FA-97FC-E9DBFA2575EE", "maker_order_id": "F49F5BD8-3F5B-4364-BCEE-F36F62DB966A", "maker_side": "buy", "maker_type": "limit", "pair": "BTC_BRL", "price": 15160, "taker_order_id": "FEAB5CEC-7F9E-4F95-B67D-9E8D5C739BE3", "taker_side": "sell", "taker_type": "market", "timestamp": 1675708481219, "total_value": 3638.4 }, { "amount": 0.00563617, "date": "2019-01-03T02:27:33.943Z", "id": "CDC492A5-B1BF-4353-BE7A-43F51C371388", "maker_order_id": "53BF30D2-901C-43D5-B0D1-62CD05DFD02A", "maker_side": "buy", "maker_type": "limit", "pair": "BTC_BRL", "price": 15163, "taker_order_id": "E4B1B38D-C871-4476-9314-3DC23292F45E", "taker_side": "sell", "taker_type": "limit", "timestamp": 1675708481220, "total_value": 84.91 } ], "nc": "next_cursor_value", "pc": "previous_cursor_value" }, "error_code": null, "message": null } ``` ```