Ripio Orders API
The Orders API from Ripio — 11 operation(s) for orders.
The Orders API from Ripio — 11 operation(s) for orders.
openapi: 3.0.0
info:
title: Ripio Trade - API Documentation Book Orders API
version: v4.0
description: "Welcome to the Ripio Trade API documentation.\n\n### Version\nThis API is currently in the version 4.\n\nIf there is need for any big change, a new version will be launched and this version will be maintained for at least 3 months.\n\nIf you're still using the version 3, [access the old documentation](../v3) and check the [migration guide](#tag/V3-Endpoint-Migrations).\n\n### Important\nUse the `Market` endpoints for all trading operations. The `Public` endpoints have a delay (cache) of up to 30 seconds.\n\nAll successful requests will result in a 200 HTTP Status.\n\nAll requests returns data in JSON format (application/json) and have a default body:\n\n\n### Success\n```\n{\n \"error_code\": null,\n \"message\": null,\n \"data\": { }\n}\n```\n\n### Error\n```\n{\n \"error_code\": [Error code],\n \"message\": \"Error description\",\n \"data\": null\n}\n```\n\n\nEndpoints that have a date filter will return data for the last 6 months if no value is sent in the `start_date` parameter.\n\n### URL structure\nThe endpoints URL follow this pattern:\n\n`https://api.ripiotrade.co/{version}/{method}[/{parameter}][?parameter=value...]`\n\n `https://api.ripiotrade.co/v4/tickers/BTC_BRL`\n\n### Limits\n\nThe request limits are based on the user's operational limits.\n\nThere are two types of limit, one of requests per second and another of daily requests. Both of them should be taken in consideration and the requests should be balanced so the daily limit isn't reached.\n\nUsers **without approved documentation** have 1 request per second or 86.400 daily requests.\n\nUsers **with approved documentation** have 3.5 requests per second or 302.400 daily requests.\n\nThese limits can be increased, and the support team should be contacted for that.\n\nWhen the requests per second limit is reached, the response HTTP Status returned is 429 and the response body is:\n```\n{\n \"message\": \"Too many requests\"\n}\n```\n\nWhen the daily requests limit is reached, the response HTTP Status returned is 429 and the response body is:\n```\n{\n \"message\": \"Limit Exceeded\"\n}\n```"
contact:
name: Jorn Filho
x-logo:
url: https://trade-images.ripio.com/general_images/logo-ripio.png
href: '#'
servers:
- url: https://api.ripiotrade.co/v4/
tags:
- name: Orders
paths:
/trades:
get:
operationId: GetTrades
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CursorTradesResponse'
description: Lists the trades history based on the filtering criteria.
summary: Trades
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- description: Currency pair code
in: query
name: pair
required: true
schema:
type: string
example: BTC_BRL
- in: query
name: start_time
required: false
schema:
$ref: '#/components/schemas/StartDateTimeNoMinParamV4'
- in: query
name: end_time
required: false
schema:
$ref: '#/components/schemas/EndDateTimeNoMinParamV4'
- in: query
name: page_size
required: false
schema:
$ref: '#/components/schemas/PageSizeParamV4'
- description: The `c` parameter is the cursor you should use to fetch the next page of results
in: query
name: c
required: false
schema:
type: string
x-mcp:
enabled: true
name: get_trades_history
usage: '- To get authenticated user trades history for a trading pair
- To analyze user-specific market activity and trading patterns
- For tracking personal trading volume and performance'
/orders:
get:
operationId: GetUserOrders
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/UserOrdersResponseV4'
description: Lists the user's orders.
summary: User Orders
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- description: Currency pair code
in: query
name: pair
required: true
schema:
type: string
example: BTC_BRL
- in: query
name: status
required: false
schema:
type: array
items:
$ref: '#/components/schemas/OrderStatusParamV4'
- in: query
name: side
required: false
schema:
$ref: '#/components/schemas/OrderSideParamV4'
- in: query
name: type
required: false
schema:
$ref: '#/components/schemas/OrderTypeParamV4'
- in: query
name: ids
required: false
schema:
$ref: '#/components/schemas/OrderIdsParamV4'
- in: query
name: start_date
required: false
schema:
$ref: '#/components/schemas/StartDateParamV4'
- in: query
name: end_date
required: false
schema:
$ref: '#/components/schemas/EndDateParamV4'
- in: query
name: page_size
required: false
schema:
$ref: '#/components/schemas/PageSizeParamV4'
- in: query
name: current_page
required: false
schema:
$ref: '#/components/schemas/CurrentPageParamV4'
- description: The `c` parameter is the cursor you should use to fetch the next page of results
in: query
name: c
required: false
schema:
type: string
x-mcp:
enabled: true
name: get_user_orders
usage: '- To list all orders for a specific trading pair
- To filter orders by status, side, type, or date range
- To retrieve order history with pagination support'
post:
operationId: CreateOrder
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderResponse'
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).'
summary: Create Order
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/LimitBuyOrderBody'
- $ref: '#/components/schemas/LimitSellOrderBody'
- $ref: '#/components/schemas/MarketBuyOrderBody'
- $ref: '#/components/schemas/MarketSellOrderBody'
- $ref: '#/components/schemas/StopLimitBuyOrderBody'
- $ref: '#/components/schemas/StopLimitSellOrderBody'
- $ref: '#/components/schemas/TrailingBuyOrderBody'
- $ref: '#/components/schemas/TrailingSellOrderBody'
- $ref: '#/components/schemas/CeilingBuyOrderBody'
- $ref: '#/components/schemas/CeilingSellOrderBody'
- $ref: '#/components/schemas/IcebergBuyOrderBody'
- $ref: '#/components/schemas/IcebergSellOrderBody'
x-mcp:
enabled: true
name: create_order
usage: '- To place buy or sell orders on trading pairs
- To create limit, market, stop-limit, trailing, ceiling, or iceberg orders
- To execute trading strategies with various order types and parameters'
delete:
operationId: CancelOrder
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrderResponse'
description: 'Cancels an active order by its `id`.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status).'
summary: Cancel Order
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
properties:
id:
type: string
description: Order `id`
example: 7155ED34-9EC4-4733-8B32-1E4319CB662F
required:
- id
type: object
x-mcp:
enabled: true
name: cancel_order
usage: '- To cancel an active order using its order ID
- To stop pending orders from executing
- To manage order lifecycle and risk control'
put:
operationId: UpdatePriceAmountOrderOnMarket
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/VoidResponse'
description: 'Allows update the amount and/or price of an order, it is not possible to change a canceled or fully executed order.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), and [`balance`](#operation/balance).'
summary: Update the amount and/or price of an order
tags:
- Orders
security:
- API Credentials:
- Read
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OrderUpdatePriceAmountOrderOnMarketBody'
x-mcp:
enabled: true
name: update_order_price_amount
usage: '- To modify the price and/or amount of an existing active order
- To adjust order parameters without canceling and recreating
- To optimize order execution by updating terms'
/orders/open:
get:
operationId: GetUserOpenOrders
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/UserOpenOrdersResponseV4'
description: Lists the user's open orders.
summary: Get User Open Orders
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- description: Currency pair code
in: query
name: pair
required: false
schema:
type: string
example: BTC_BRL
- in: query
name: side
required: false
schema:
$ref: '#/components/schemas/OrderSideParamV4'
- in: query
name: page_size
required: false
schema:
$ref: '#/components/schemas/PageSizeParamV4'
- in: query
name: current_page
required: false
schema:
$ref: '#/components/schemas/CurrentPageParamV4'
- description: The `c` parameter is the cursor you should use to fetch the next page of results
in: query
name: c
required: false
schema:
type: string
x-mcp:
enabled: true
name: get_user_open_orders
usage: '- To list all currently active orders for a user
- To monitor pending orders by trading pair or side
- To check order status and remaining amounts'
/orders/trades:
get:
operationId: GetTrades
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/UserTradesResponseV4'
description: 'Get the trades from an order.
**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.'
summary: Get Trades based on a order id
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- description: Order id from a valid order
in: query
name: order_id
required: true
schema:
type: string
- in: query
name: page_size
required: false
schema:
$ref: '#/components/schemas/PageSizeParamV4'
- description: The `c` parameter is the cursor you should use to fetch the next page of results
in: query
name: c
required: false
schema:
type: string
x-mcp:
enabled: true
name: get_trades_by_order_id
usage: '- To list all trades that have the given order as maker or taker
- To analyze order execution details and fill history
- To track partial fills and trade timestamps for specific orders'
/orders/{id}:
get:
operationId: GetOrderById
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/UserOrderResponse'
description: Returns the details of an order belonging to the user (by id).
summary: User Order by Id
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- in: path
name: id
required: true
schema:
$ref: '#/components/schemas/OrderIdParamV4'
x-mcp:
enabled: true
name: get_order_by_id
usage: '- To retrieve detailed information about a specific order
- To check order status, execution details, and transaction history
- To get comprehensive order data including fees and timestamps'
/orders/by-external-id/{external_id}:
get:
operationId: GetOrderByExternalId
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/UserOrderResponse'
description: Returns the details of a order belonging to the user (by external id).
summary: User Order by External Id
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- in: path
name: external_id
required: true
schema:
$ref: '#/components/schemas/OrderExternalIdParamV4'
x-mcp:
enabled: true
name: get_order_by_external_id
usage: '- To retrieve order details using custom external identifier
- To track orders created with external reference IDs
- To get order information when only external ID is available'
/orders/cancel:
post:
operationId: CancelOrderByPost
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrderResponse'
description: 'Cancels an active order by its `id` using POST.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status).'
summary: Cancel Order
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
properties:
id:
type: string
description: Order `id`
example: 7155ED34-9EC4-4733-8B32-1E4319CB662F
required:
- id
type: object
x-mcp:
enabled: true
name: cancel_order_post
usage: '- To cancel an active order using POST method with order ID
- To stop pending orders from executing via POST request
- Alternative method for order cancellation when DELETE is not available'
/orders/by-external-id:
delete:
operationId: CancelOrderByExternalId
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrderResponse'
description: 'Cancels an active order by its `external_id`.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status).'
summary: Cancel Order By External Id
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
properties:
external_id:
type: string
description: Order `external_id`
example: 0F4A8504-21FB-4BE6-9771-25DCF5F68F87
required:
- external_id
type: object
x-mcp:
enabled: true
name: cancel_order_by_external_id
usage: '- To cancel an active order using custom external identifier
- To stop orders when only external ID is available
- To manage orders created with external reference tracking'
/orders/cancel-by-external-id:
post:
operationId: CancelOrderByExternalIdByPost
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CancelOrderResponse'
description: 'Cancels an active order by its `external_id` using POST.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status).'
summary: Cancel Order By External Id
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
properties:
external_id:
type: string
description: Order `external_id`
example: 0F4A8504-21FB-4BE6-9771-25DCF5F68F87
required:
- external_id
type: object
x-mcp:
enabled: true
name: cancel_order_by_external_id_post
usage: '- To cancel an active order using POST method with external ID
- Alternative method for external ID order cancellation
- To manage orders when DELETE method is not available'
/orders/all:
delete:
operationId: CancelAllOrders
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/CancelAllOrdersResponse'
description: 'Cancels all the user''s active orders.
Publishes updates in the following websocket topics: [`orderbook`](#operation/orderbook), [`balance`](#operation/balance) and [`order_status`](#operation/order_status).'
summary: Cancel All Orders
tags:
- Orders
security:
- API Credentials:
- Buy/Sell
parameters: []
requestBody:
required: true
content:
application/json:
schema:
properties:
pair:
type: string
description: Currency pair code
example: BTC_BRL
type: object
x-mcp:
enabled: true
name: cancel_all_orders
usage: '- To cancel all active orders for a specific trading pair
- To quickly close all open positions in emergency situations
- To clear all pending orders for risk management'
/orders/estimate-price/{pair}:
get:
operationId: EstimatePrice
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/EstimatedPriceResponseV4'
description: Estimates the market unit price for a specific amount of a given currency pair.
summary: Estimate Price
tags:
- Orders
security:
- API Credentials:
- Read
parameters:
- description: Currency pair code
in: path
name: pair
required: true
schema:
type: string
example: BTC_BRL
- description: Amount to be used in the estimative.
in: query
name: amount
required: true
schema:
format: double
type: number
- in: query
name: side
required: true
schema:
$ref: '#/components/schemas/OrderSideParamV4'
x-mcp:
enabled: true
name: estimate_order_price
usage: '- To estimate execution price for market orders before placement
- To calculate expected costs for trading amounts
- To preview order impact on market prices'
components:
schemas:
UserOrdersDataV4:
properties:
orders:
items:
$ref: '#/components/schemas/UserPreparedOrder'
type: array
example:
- create_date: '2017-12-08T23:42:54.960Z'
executed_amount: 0.02347418
external_id: B4A9F7F4-9C79-4921-9330-224C17260BDF
id: 857C0A3B-D70F-4256-9051-1C62FADBA8FA
pair: BTC_BRL
price: 42600
remaining_amount: 0
remaining_value: 0
requested_amount: 0.02347418
requested_value: 1000
side: buy
status: executed_completely
total_value: 1000
type: limit
update_date: '2017-12-13T21:48:48.817Z'
fee: 1
- create_date: '2017-10-20T00:26:40.403Z'
executed_amount: 0.00033518
external_id: 13080055-7357-4110-81B1-981E6699FA57
id: 3ECBE371-DE24-42E8-841C-4281B3164CCE
pair: BTC_BRL
price: 16352.12
remaining_amount: 0
remaining_value: 0
requested_amount: 0.00033518
requested_value: 5.48090358
side: buy
status: executed_completely
total_value: 5.48090358
type: limit
update_date: '2017-10-20T00:26:40.467Z'
fee: 1
pagination:
$ref: '#/components/schemas/PaginationV4'
nc:
type: string
nullable: true
description: Next cursor for pagination
pc:
type: string
nullable: true
description: Previous cursor for pagination
required:
- orders
- pagination
type: object
additionalProperties: false
Trade:
properties:
amount:
type: number
format: double
description: Amount
date:
type: string
description: Trade date (UTC format)
id:
type: string
description: Trade id
maker_order_id:
type: string
description: Maker order id
maker_side:
type: string
description: Maker order side (sell / buy)
maker_type:
type: string
description: Maker order type (market / limit)
price:
type: number
format: double
description: Price
pair:
type: string
description: Currency pair code
example: BTC_BRL
taker_order_id:
type: string
description: Taker order id
taker_side:
type: string
description: Taker order side (sell / buy)
taker_type:
type: string
description: Taker order type (market / limit)
timestamp:
type: number
format: double
description: Current timestamp
example: 1675708481219
total_value:
type: number
format: float
description: Total value
required:
- amount
- date
- id
- maker_order_id
- maker_side
- maker_type
- price
- pair
- taker_order_id
- taker_side
- taker_type
- timestamp
- total_value
type: object
additionalProperties: false
StartDateTimeNoMinParamV4:
type: string
default: '[6 months ago]'
example: '2020-01-01T00:00:00-03:00'
format: datetime
description: Initial datetime filter in ISO-8601 format
OrderIdsParamV4:
type: string
example: a6f7f8b3-e531-4522-810c-4f726f796b10,1594d0af-9239-466b-805b-a4f5df5f16d9
description: Identifiers list separated by commas (maximum of 10 identifiers)
CeilingBuyOrderBody:
properties:
external_id:
$ref: '#/components/schemas/OrderExternalIdParamV4'
pair:
type: string
description: Currency pair code
side:
type: string
enum:
- buy
nullable: false
description: Order's side (buy)
type:
type: string
enum:
- ceiling
nullable: false
description: Order's type (ceiling)
value:
type: number
format: double
description: Order value in quote currency
fill_or_kill:
type: boolean
description: If set to `true`, the order will either be completely filled or canceled
required:
- pair
- side
- type
- value
type: object
additionalProperties: false
example:
pair: BTC_BRL
side: buy
type: market
amount: 0.1
fill_or_kill: false
UserOrdersResponseV4:
properties:
data:
$ref: '#/components/schemas/UserOrdersDataV4'
error_code:
type: number
enum:
- null
nullable: true
example: null
message:
type: string
nullable: true
example: null
required:
- data
- error_code
- message
type: object
additionalProperties: false
PaginationV4:
properties:
current_page:
type: number
format: double
description: Current page
page_size:
type: number
format: double
description: Page size
registers_count:
type: number
format: double
description: Total number of registers
total_pages:
type: number
format: double
description: Total number of pages
required:
- current_page
- page_size
- registers_count
- total_pages
type: object
additionalProperties: false
example:
current_page: 1
registers_count: 21
total_pages: 1
page_size: 100
UserTradesDataV4:
properties:
trades:
items:
$ref: '#/components/schemas/UserPreparedTradeV4'
type: array
example:
- amount: 0.00270754
date: '2019-04-02T11:22:22.403Z'
fee: 0.25
fee_currency: USDC
id: 488F9395-47ED-4924-98AB-C860E1733A03
maker_order_id: 1FD30735-E055-4200-AD3D-007B02A5BA92
pair_code: BTC_USDC
taker_or_maker: maker
price: 18550
side: sell
taker_order_id: DBC6D4AF-D454-46DF-80EC-E19528A0FB25
timestamp: 1675708481219
type: market
total_value: 50.22
- amount: 0.0026938
date: '2019-04-02T11:25:41.512Z'
fee: 1.347e-05
fee_currency: BTC
id: C79ED37D-DC21-4D54-8AFC-4262347E3F8D
maker_order_id: F49F5BD8-3F5B-4364-BCEE-F36F62DB966A
pair_code: BTC_USDC
taker_or_maker: taker
price: 18550
side: buy
taker_order_id: FEAB5CEC-7F9E-4F95-B67D-9E8D5C739BE3
timestamp: 1675708481220
type: market
total_value: 49.96
pagination:
$ref: '#/components/schemas/PaginationV4'
nc:
type: string
nullable: true
description: This is the next cursor, use its value with the `c` parameter to retrieve the next page
pc:
type: string
nullable: true
description: This is the previous cursor, use its value with the `c` parameter to retrieve the previous page
required:
- trades
- pagination
type: object
additionalProperties: false
CancelAllOrdersData:
properties:
pair_code:
type: string
description: Pair code
example: BTC_BRL
order_id:
type: string
description: Order identifier
success:
type: boolean
description: Success flag
required:
- pair_code
- order_id
- success
type: object
additionalProperties: false
EndDateTimeNoMinParamV4:
type: string
default: '[Current datetime]'
example: '2020-01-02T23:59:59-03:00'
format: datetime
description: Final datetime filter in ISO-8601 format
EstimatedPriceResponseDataV4:
properties:
price:
type: number
format: double
description: Estimated price
example: 54049.12
required:
- price
type: object
additionalProperties: false
CursorTradesResponseData:
properties:
trades:
items:
$ref: '#/components/schemas/Trade'
type: array
example:
- 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
- amount: 0.00680154
date: '2019-01-03T02:27:33.940Z'
id: 910AA20F-211F-4755-90A7-94227DB407D8
maker_order_id: 1FD30735-E055-4200-AD3D-007B02A5BA92
maker_side: buy
maker_type: limit
pair: BTC_BRL
price: 15163.03
taker_order_id: DBC6D4AF-D454-46DF-80EC-E19528A0FB25
taker_side: sell
taker_type: limit
timestamp: 1675708481221
total_value: 104.1
nc:
type: string
nullable: true
description: This is the next cursor, use its value with the `c` parameter to retrieve the next page
pc:
type: string
nullable: true
description: This is the previous cursor, use its value with the `c` parameter to retrieve the previous page
required:
- trades
type: object
additionalProperties: false
UserTradesResponseV4:
properties:
data:
$ref: '#/components/schemas/UserTradesDataV4'
error_code:
type: number
enum:
- null
nullable: true
example: null
message:
type: string
nullable: true
# --- truncated at 32 KB (117 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ripio/refs/heads/main/openapi/ripio-orders-api-openapi.yml