Ribbon Finance Positions API

Position and portfolio endpoints

OpenAPI Specification

ribbon-finance-positions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Aevo Exchange Private REST Account Positions API
  description: Authenticated REST API for Aevo exchange providing account management, order placement and management, position tracking, portfolio data, transfers, withdrawals, and trading history. Requires AEVO-KEY and AEVO-SECRET authentication headers obtained via cryptographic key registration.
  version: 1.0.0
  contact:
    name: Aevo Support
    url: https://docs.aevo.xyz/
servers:
- url: https://api.aevo.xyz
  description: Aevo Exchange production server
security:
- AevoKey: []
  AevoSecret: []
tags:
- name: Positions
  description: Position and portfolio endpoints
paths:
  /positions:
    get:
      tags:
      - Positions
      summary: Get open positions
      description: Returns all open positions for the authenticated account including Greeks, margins, and liquidation information.
      operationId: getPositions
      responses:
        '200':
          description: Open positions
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: string
                    description: Ethereum address
                  positions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Position'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
  /portfolio:
    get:
      tags:
      - Positions
      summary: Get portfolio
      description: Returns portfolio-level information for the authenticated account.
      operationId: getPortfolio
      responses:
        '200':
          description: Portfolio data
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    Position:
      type: object
      properties:
        instrument_id:
          type: string
        instrument_name:
          type: string
        instrument_type:
          type: string
          enum:
          - OPTION
          - PERPETUAL
          - SPOT
        option:
          type: object
          properties:
            strike:
              type: string
            option_type:
              type: string
              enum:
              - put
              - call
            expiry:
              type: string
            iv:
              type: string
            delta:
              type: string
            theta:
              type: string
            vega:
              type: string
            rho:
              type: string
            gamma:
              type: string
        asset:
          type: string
        amount:
          type: string
        side:
          type: string
          enum:
          - buy
          - sell
        mark_price:
          type: string
        avg_entry_price:
          type: string
        unrealized_pnl:
          type: string
        initial_margin:
          type: string
        maintenance_margin:
          type: string
        margin_type:
          type: string
          enum:
          - CROSS
          - ISOLATED
        adl_rank:
          type: string
          enum:
          - na
          - low
          - medium
          - high
        liquidation_price:
          type: string
        leverage:
          type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    AevoKey:
      type: apiKey
      in: header
      name: AEVO-KEY
      description: API key obtained from Aevo account settings
    AevoSecret:
      type: apiKey
      in: header
      name: AEVO-SECRET
      description: API secret obtained from Aevo account settings