RiskReward Pro Position Size API

The Position Size API from RiskReward Pro — 1 operation(s) for position size.

GitHub OpenAPI

Operations 1

POST /api/v1/position-size Fee-aware position size #

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/riskreward-pro:riskreward-pro-position-size-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

riskreward-pro-position-size-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RiskReward Pro Free Calculation Position Size API
  version: 1.0.0
  contact:
    name: RiskReward Pro support
    email: support@riskreward.pro
    url: https://riskreward.pro/support
  description: Stateless trading calculations. No API key, account access, market data, trade execution or data persistence by the calculation service. Inputs must be supplied by the user. Hosting logs may contain request metadata.
servers:
- url: https://riskreward.pro
security: []
tags:
- name: Position Size
paths:
  /api/v1/position-size:
    post:
      operationId: calculate_position_size
      summary: Fee-aware position size
      description: Calculate position quantity and notional for a linear crypto futures trade from user-specified account balance, risk percentage, entry and stop. Includes separate entry/stop fees and optional target profit and net R. Direction is derived. Use when asked how much to buy or sell for a specified risk budget. Ask for missing prices or risk preference; do not invent them. Does not calculate liquidation, leverage, inverse contracts, exchange lot rounding, signals, or execute orders.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                instrumentType:
                  description: Linear quote-margined instruments only. Inverse contracts and liquidation are unsupported.
                  type: string
                  const: linear
                quoteCurrency:
                  description: Currency shared by all monetary inputs. Defaults to USD; no currency conversion is performed.
                  type: string
                  pattern: ^[A-Z][A-Z0-9]{1,9}$
                entryPrice:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000000000
                  description: Planned entry price in quote currency per base unit.
                stopPrice:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000000000
                  description: Planned stop price. Direction is derived from entry and stop.
                fees:
                  description: User-supplied rates. Omission explicitly assumes zero fees; no exchange rate lookup is performed.
                  type: object
                  properties:
                    entryPercent:
                      type: number
                      minimum: 0
                      exclusiveMaximum: 100
                      description: Entry fee percent, e.g. 0.05 means 0.05%, not 5%.
                    stopPercent:
                      type: number
                      minimum: 0
                      exclusiveMaximum: 100
                      description: Stop exit fee percent, e.g. 0.05.
                    targetPercent:
                      description: Target exit fee percent; defaults to stopPercent.
                      type: number
                      minimum: 0
                      exclusiveMaximum: 100
                  required:
                  - entryPercent
                  - stopPercent
                  additionalProperties: false
                accountBalance:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000000000
                  description: Account balance in the same quote currency as prices.
                riskPercent:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 100
                  description: User-chosen account risk percentage, e.g. 1 means 1%. Never infer a risk preference.
                targetPrice:
                  description: Optional profit target, opposite the stop relative to entry.
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000000000
              required:
              - entryPrice
              - stopPrice
              - accountBalance
              - riskPercent
              additionalProperties: false
            example:
              accountBalance: 10000
              riskPercent: 1
              entryPrice: 100000
              stopPrice: 95000
              targetPrice: 110000
              quoteCurrency: USDT
              fees:
                entryPercent: 0.02
                stopPercent: 0.05
                targetPercent: 0.02
      responses:
        '200':
          description: Calculation with normalized inputs, explicit assumptions, units and reproducible link.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  tool:
                    type: string
                    enum:
                    - calculate_position_size
                    - calculate_net_risk_reward
                    - analyze_trade_performance
                  calculationVersion:
                    type: string
                    const: 1.0.0
                  inputs:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  metrics:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: object
                      properties:
                        value:
                          type:
                          - number
                          - 'null'
                        unit:
                          type: string
                        label:
                          type: string
                      required:
                      - value
                      - unit
                      - label
                      additionalProperties: false
                  assumptions:
                    type: array
                    items:
                      type: string
                  warnings:
                    type: array
                    items:
                      type: string
                  formulas:
                    type: array
                    items:
                      type: string
                  documentationUrl:
                    type: string
                    format: uri
                  reproduceUrl:
                    anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                required:
                - tool
                - calculationVersion
                - inputs
                - metrics
                - assumptions
                - warnings
                - formulas
                - documentationUrl
                - reproduceUrl
                additionalProperties: false
        '400':
          description: Malformed JSON. Correct its UTF-8 JSON encoding.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '403':
          description: Invalid Host or Origin. Use the canonical HTTPS API host.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '404':
          description: Unknown API endpoint. Discover supported endpoints through /api.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '405':
          description: Unsupported HTTP method. Use POST with JSON.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
          headers:
            Allow:
              schema:
                type: string
              description: Supported HTTP methods.
        '413':
          description: Body exceeds 64 KiB. Reduce the request size.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '415':
          description: Content-Type must be application/json.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '422':
          description: Missing/invalid inputs or unsupported scenario. Correct input before retrying.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
        '429':
          description: Request rate exceeded. Respect Retry-After.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code.
                      message:
                        type: string
                        description: Explanation of why this request failed.
                      resolution:
                        type: string
                        description: Concrete corrective action before retrying.
                      documentation:
                        type: string
                        format: uri
                        description: Public documentation for the API contract.
                      issues:
                        description: Field-specific validation errors, when applicable.
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                          required:
                          - path
                          - message
                          additionalProperties: false
                    required:
                    - code
                    - message
                    - resolution
                    - documentation
                    additionalProperties: false
                required:
                - error
                additionalProperties: false
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait before retrying.
      tags:
      - Position Size
externalDocs:
  url: https://riskreward.pro/developers/api
  description: RiskReward Pro API documentation, units, examples, and limits.