Ripio WebSocket API

The WebSocket API API from Ripio — 0 operation(s) for websocket api.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ripio-websocket-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ripio-websocket-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ripio WebSocket API
  version: v4.0
  contact:
    name: Jorn Filho
  x-logo:
    url: https://trade-images.ripio.com/general_images/logo-ripio.png
    href: '#'
  description: 'Operations tagged WebSocket API across 2 of this provider''s published API definitions: ripio-trade-openapi.yml, ripio-websocket-api-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.ripiotrade.co/v4/
tags:
- name: WebSocket API
  description: The WebSocket API allows you to perform trading operations (create, cancel, and update orders) via WebSocket connection.
paths: {}
webhooks:
  order.create:
    post:
      summary: Create Order via WebSocket
      description: Creates a new trading order via WebSocket API. Supports all order types available in the REST API including limit, market, stop-limit, trailing, ceiling, and iceberg orders.
      operationId: order.create
      tags:
      - WebSocket API
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebSocketCreateRequest'
            examples:
              limitBuyOrder:
                summary: Create Limit Buy Order
                value:
                  id: req-001
                  method: order.create
                  params:
                    apiToken: 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
                    post_only: false
                    expiration: 1723073682
                    immediate_or_cancel: false
                    fill_or_kill: false
              limitSellOrder:
                summary: Create Limit Sell Order
                value:
                  id: req-002
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: sell
                    type: limit
                    amount: 1
                    price: 700000
                    external_id: my-sell-order-456
                    post_only: false
                    expiration: 1723073682
                    immediate_or_cancel: false
                    fill_or_kill: false
              marketBuyOrder:
                summary: Create Market Buy Order
                value:
                  id: req-003
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: buy
                    type: market
                    amount: 0.1
                    value: 50000
                    external_id: market-buy-789
                    fill_or_kill: false
              marketSellOrder:
                summary: Create Market Sell Order
                value:
                  id: req-004
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: ETH_BRL
                    side: sell
                    type: market
                    amount: 0.1
                    value: 1000
                    external_id: market-sell-101
                    fill_or_kill: false
              stopLimitBuyOrder:
                summary: Create Stop Limit Buy Order
                value:
                  id: req-005
                  method: order.create
                  params:
                    apiToken: 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
              stopLimitSellOrder:
                summary: Create Stop Limit Sell Order
                value:
                  id: req-006
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: sell
                    type: stop_limit
                    amount: 1
                    price: 700000
                    stop_price: 750000
                    external_id: stop-sell-303
              trailingBuyOrder:
                summary: Create Trailing Buy Order
                value:
                  id: req-007
                  method: order.create
                  params:
                    apiToken: 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
              trailingSellOrder:
                summary: Create Trailing Sell Order
                value:
                  id: req-008
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: sell
                    type: trailing
                    amount: 1
                    price: 700000
                    distance: 5000
                    external_id: trailing-sell-505
              ceilingBuyOrder:
                summary: Create Ceiling Buy Order
                value:
                  id: req-009
                  method: order.create
                  params:
                    apiToken: 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
              ceilingSellOrder:
                summary: Create Ceiling Sell Order
                value:
                  id: req-010
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: sell
                    type: ceiling
                    value: 70000
                    external_id: ceiling-sell-707
                    fill_or_kill: false
              icebergBuyOrder:
                summary: Create Iceberg Buy Order
                value:
                  id: req-011
                  method: order.create
                  params:
                    apiToken: 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
              icebergSellOrder:
                summary: Create Iceberg Sell Order
                value:
                  id: req-012
                  method: order.create
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    pair: BTC_BRL
                    side: sell
                    type: iceberg
                    amount: 10
                    step_amount: 1
                    price: 700000
                    external_id: iceberg-sell-909
      responses:
        '200':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketResponse'
              example:
                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
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketErrorResponse'
              example:
                id: req-001
                status: 400
                result: null
                error:
                  error_code: 40011
                  message: Insufficient funds.
    servers:
    - url: https://api.ripiotrade.co/v4/
  order.cancel:
    delete:
      summary: Cancel Order via WebSocket
      description: Cancels an active trading order via WebSocket API. You can cancel by order ID or external ID.
      operationId: order.cancel
      tags:
      - WebSocket API
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Unique request identifier for correlation
                method:
                  type: string
                  enum:
                  - order.cancel
                  description: WebSocket API method
                params:
                  type: object
                  properties:
                    apiToken:
                      type: string
                      description: API Token for authentication
                    timestamp:
                      type: integer
                      format: int64
                      description: Timestamp in milliseconds
                    signature:
                      type: string
                      description: HMAC SHA256 signature
                    id:
                      type: string
                      description: Order ID (use either id or external_id, not both)
                    external_id:
                      type: string
                      description: External Order ID (use either id or external_id, not both)
                  required:
                  - apiToken
                  - timestamp
                  - signature
              required:
              - id
              - method
              - params
            examples:
              cancelById:
                summary: Cancel Order by ID
                value:
                  id: req-003
                  method: order.cancel
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
              cancelByExternalId:
                summary: Cancel Order by External ID
                value:
                  id: req-004
                  method: order.cancel
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    external_id: my-order-123
      responses:
        '200':
          description: Order canceled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketCancelResponse'
              example:
                id: req-003
                status: 200
                result:
                  id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
                  create_date: '2024-03-27T13:27:19.853Z'
                  executed_amount: 0
                  remaining_amount: 0.001
                  remaining_value: 100
                  requested_amount: 0.001
                  status: canceled
                  total_value: 100
                  type: limit
                  price: 100000
                  update_date: '2024-03-27T13:30:45.123Z'
                  pair: BTC_BRL
                  external_id: my-order-123
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketErrorResponse'
              example:
                id: req-003
                status: 400
                result: null
                error:
                  error_code: 40020
                  message: Order already canceled.
    servers:
    - url: https://api.ripiotrade.co/v4/
  order.update:
    put:
      summary: Update Order via WebSocket
      description: Updates the price and/or amount of an existing active order via WebSocket API. It is not possible to change a canceled or fully executed order.
      operationId: order.update
      tags:
      - WebSocket API
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Unique request identifier for correlation
                method:
                  type: string
                  enum:
                  - order.update
                  description: WebSocket API method
                params:
                  type: object
                  properties:
                    apiToken:
                      type: string
                      description: API Token for authentication
                    timestamp:
                      type: integer
                      format: int64
                      description: Timestamp in milliseconds
                    signature:
                      type: string
                      description: HMAC SHA256 signature
                    id:
                      type: string
                      description: Order ID to update
                    price:
                      type: string
                      description: New unit price (optional, but at least one of price or amount must be provided)
                    amount:
                      type: string
                      description: New order amount (optional, but at least one of price or amount must be provided)
                  required:
                  - apiToken
                  - timestamp
                  - signature
                  - order_id
              required:
              - id
              - method
              - params
            examples:
              updatePriceAndAmount:
                summary: Update Order Price and Amount
                value:
                  id: req-005
                  method: order.update
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
                    price: '105000'
                    amount: '0.002'
              updatePriceOnly:
                summary: Update Order Price Only
                value:
                  id: req-006
                  method: order.update
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
                    price: '110000'
              updateAmountOnly:
                summary: Update Order Amount Only
                value:
                  id: req-007
                  method: order.update
                  params:
                    apiToken: your-api-token
                    timestamp: 1634567890000
                    signature: calculated-signature
                    id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
                    amount: '0.003'
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketUpdateResponse'
              example:
                id: req-005
                status: 200
                result: null
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebSocketErrorResponse'
              example:
                id: req-005
                status: 400
                result: null
                error:
                  error_code: 40021
                  message: Order executed completely.
    servers:
    - url: https://api.ripiotrade.co/v4/
components:
  schemas:
    WebSocketAuthParams:
      type: object
      properties:
        apiToken:
          type: string
          description: API Token for authentication
        timestamp:
          type: integer
          format: int64
          description: Timestamp in milliseconds
        signature:
          type: string
          description: HMAC SHA256 signature
      required:
      - apiToken
      - timestamp
      - signature
      example:
        apiToken: your-api-token
        timestamp: 1634567890000
        signature: calculated-signature
    WebSocketUpdateResponse:
      type: object
      properties:
        id:
          type: string
          description: Request identifier for correlation
        status:
          type: integer
          description: HTTP status code
        result:
          type: 'null'
          description: Always null for update responses
      required:
      - id
      - status
      - result
      example:
        id: req-005
        status: 200
        result: null
    StopLimitSellOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - sell
          description: Order's side (sell)
        type:
          type: string
          enum:
          - stop_limit
          description: Order's type (stop_limit)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        price:
          type: number
          format: double
          description: Limit price
        stop_price:
          type: number
          format: double
          description: Stop price
      required:
      - pair
      - side
      - type
      - amount
      - price
      - stop_price
      type: object
      additionalProperties: false
      example:
        amount: 1
        pair: BTC_BRL
        price: 700000
        side: sell
        stop_price: 1
        type: stop_limit
    LimitBuyOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - buy
          description: Order's side (buy)
        type:
          type: string
          enum:
          - limit
          description: Order's type (limit)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        price:
          type: number
          format: double
          description: Limit price
        post_only:
          type: boolean
          description: If set to `true`, the order will be added directly to the order book without an initial match, provided the request is valid
        expiration:
          type: number
          format: double
          description: If a valid timestamp is provided, the order will be created with an expiration date and time
        immediate_or_cancel:
          type: boolean
          description: If set to `true`, the order will not be added to the order book after the initial match, any remaining unfilled amount will result in the order being canceled
        fill_or_kill:
          type: boolean
          description: If set to `true`, the order will either be completely filled or canceled
      required:
      - pair
      - side
      - type
      - amount
      - price
      type: object
      additionalProperties: false
      example:
        amount: 0.1
        pair: BTC_BRL
        price: 700000
        side: buy
        type: limit
        post_only: false
        expiration: 1723073682
        immediate_or_cancel: false
        fill_or_kill: false
      title: Buy Limit
    StopLimitBuyOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - buy
          description: Order's side (buy)
        type:
          type: string
          enum:
          - stop_limit
          description: Order's type (stop_limit)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        price:
          type: number
          format: double
          description: Limit price
        stop_price:
          type: number
          format: double
          description: Stop price
      required:
      - pair
      - side
      - type
      - amount
      - price
      - stop_price
      type: object
      additionalProperties: false
      example:
        amount: 1
        pair: BTC_BRL
        price: 700000
        side: buy
        stop_price: 1
        type: stop_limit
    IcebergBuyOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - buy
          description: Order's side (buy)
        type:
          type: string
          enum:
          - iceberg
          description: Order's type (iceberg)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        step_amount:
          type: number
          format: double
          description: Step amount (the ratio of amount to step_amount must be less than or equal to 10)
        price:
          type: number
          format: double
          description: Limit price
      required:
      - pair
      - side
      - type
      - amount
      - step_amount
      - price
      type: object
      additionalProperties: false
      example:
        amount: 10
        step_amount: 1
        pair: BTC_BRL
        price: 700000
        side: buy
        type: iceberg
    WebSocketResponse:
      type: object
      properties:
        id:
          type: string
          description: Request identifier for correlation
        status:
          type: integer
          description: HTTP status code
        result:
          $ref: '#/components/schemas/UserOrderOutput'
          description: Order creation result with same schema as REST API
      required:
      - id
      - status
      - result
      example:
        id: req-123
        status: 200
        result:
          id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
          status: open
          create_date: '2024-03-27T13:27:19.853Z'
          external_id: BEAB10B1-45B0-4999-9B2F-D2ED048D6C42
          pair: BTC_BRL
          side: buy
          executed_amount: 0
          remaining_amount: 0.001
          remaining_value: 100
          requested_amount: 0.001
          requested_value: 100
    MarketBuyOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - buy
          description: Order's side (buy)
        type:
          type: string
          enum:
          - market
          description: Order's type (market)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        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
      - amount
      - value
      type: object
      additionalProperties: false
      example:
        pair: BTC_BRL
        side: buy
        type: market
        amount: 0.1
        fill_or_kill: false
      title: Buy Market
    WebSocketCancelResponse:
      type: object
      properties:
        id:
          type: string
          description: Request identifier for correlation
        status:
          type: integer
          description: HTTP status code
        result:
          type: object
          properties:
            id:
              type: string
            create_date:
              type: string
            executed_amount:
              type: number
            external_id:
              type: string
            pair:
              type: string
            price:
              type: number
            remaining_amount:
              type: number
            remaining_value:
              type: number
            requested_amount:
              type: number
            side:
              type: string
            status:
              type: string
            total_value:
              type: number
            type:
              type: string
            update_date:
              type: string
          description: Canceled order details
      required:
      - id
      - status
      - result
      example:
        id: req-003
        status: 200
        result:
          id: 7155ED34-9EC4-4733-8B32-1E4319CB662F
          create_date: '2024-03-27T13:27:19.853Z'
          executed_amount: 0
          external_id: my-order-123
          pair: BTC_BRL
          price: 100000
          remaining_amount: 0.001
          remaining_value: 100
          requested_amount: 0.001
          side: buy
          status: canceled
          total_value: 100
          type: limit
          update_date: '2024-03-27T13:30:45.123Z'
    WebSocketCreateRequest:
      type: object
      properties:
        id:
          type: string
          description: Unique request identifier for correlation
        method:
          type: string
          enum:
          - order.create
          description: WebSocket API method
        params:
          allOf:
          - $ref: '#/components/schemas/WebSocketAuthParams'
          - 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'
      required:
      - id
      - method
      - params
      example:
        id: req-123
        method: order.create
        params:
          apiToken: your-api-token
          timestamp: 1634567890000
          signature: calculated-signature
          pair: BTC_BRL
          side: buy
          type: limit
          amount: 0.001
          price: 100000
    WebSocketErrorResponse:
      type: object
      properties:
        id:
          type: string
          description: Request identifier for correlation
        status:
          type: integer
          description: HTTP error status code
        result:
          type: 'null'
          description: Always null for error responses
        error:
          type: object
          properties:
            error_code:
              type: integer
              description: Error code
            message:
              type: string
              description: Error message
          required:
          - error_code
          - message
      required:
      - id
      - status
      - result
      - error
      example:
        id: req-123
        status: 400
        result: null
        error:
          error_code: 40011
          message: Insufficient funds.
    MarketSellOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - sell
          description: Order's side (sell)
        type:
          type: string
          enum:
          - market
          description: Order's type (market)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        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
      - amount
      - value
      type: object
      additionalProperties: false
      example:
        pair: BTC_BRL
        side: sell
        type: market
        amount: 1
        fill_or_kill: false
      title: Sell Market
    TrailingSellOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - sell
          description: Order's side (sell)
        type:
          type: string
          enum:
          - trailing
          description: Order's type (trailing)
        amount:
          type: number
          format: double
          description: Order amount in base currency
        price:
          type: number
          format: double
          description: Limit price
        distance:
          type: number
          format: double
          description: Price distance
      required:
      - pair
      - side
      - type
      - amount
      - price
      - distance
      type: object
      additionalProperties: false
      example:
        pair: BTC_BRL
        side: sell
        type: trailing
        amount: 1
        distance: 1
    CeilingBuyOrderBody:
      properties:
        external_id:
          $ref: '#/components/schemas/OrderExternalIdParamV4'
        pair:
          type: string
          description: Currency pair code
        side:
          type: string
          enum:
          - buy
          description: Order's side (buy)
        type:
          type: string
          enum:
          - ceiling
          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
 

# --- truncated at 32 KB (54 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ripio/refs/heads/main/openapi/ripio-websocket-api-api-openapi.yml