openapi: 3.2.0 info: title: EVEDEX - AI-Strategies Strategy API version: 1.0.0 servers: - url: https://ai-strategies-api.evedex.com tags: - name: Strategy paths: /api/user/strategy: put: tags: - Strategy security: - InternalToken: [] requestBody: required: true content: application/json: schema: type: object properties: strategyId: type: integer exclusiveMinimum: 0 initial_deposit: type: string evedexUserId: type: string minLength: 1 required: - strategyId - initial_deposit - evedexUserId responses: '200': description: 200 OK content: application/json: schema: type: object properties: id: type: number user_id: type: number pair_id: type: number strategy_id: type: number initial_deposit: type: string realized_pnl: type: string current_balance: type: string is_active: type: boolean activated_at: type: - string - 'null' created_at: type: string updated_at: type: string bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' timeframe: type: string enum: - 1m - 3m - 5m - 15m required: - id - user_id - pair_id - strategy_id - initial_deposit - realized_pnl - is_active - activated_at - created_at - updated_at - bias - reinvest_earnings - risk_percent - timeframe '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' delete: tags: - Strategy security: - InternalToken: [] parameters: - in: query name: strategyId schema: type: integer exclusiveMinimum: 0 required: true - in: query name: evedexUserId schema: type: string minLength: 1 required: true responses: '200': description: 200 OK content: application/json: schema: type: object properties: id: type: number api_key: type: string minLength: 1 required: - id - api_key '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: tags: - Strategy security: - InternalToken: [] parameters: - in: query name: evedex_id schema: type: string minLength: 1 required: true responses: '200': description: 200 OK content: application/json: schema: type: array items: type: object properties: id: type: number user_id: type: number pair_id: type: number strategy_id: type: number initial_deposit: type: string realized_pnl: type: string current_balance: type: string is_active: type: boolean activated_at: type: - string - 'null' created_at: type: string updated_at: type: string bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' timeframe: type: string enum: - 1m - 3m - 5m - 15m required: - id - user_id - pair_id - strategy_id - initial_deposit - realized_pnl - is_active - activated_at - created_at - updated_at - bias - reinvest_earnings - risk_percent - timeframe '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: tags: - Strategy security: - InternalToken: [] requestBody: required: true content: application/json: schema: type: object properties: strategyId: type: integer exclusiveMinimum: 0 initial_deposit: type: string evedexUserId: type: string minLength: 1 api_key: type: string minLength: 1 private_key: type: string minLength: 1 required: - strategyId - initial_deposit - evedexUserId - api_key - private_key responses: '200': description: 200 OK content: application/json: schema: type: object properties: id: type: number user_id: type: number pair_id: type: number strategy_id: type: number initial_deposit: type: string realized_pnl: type: string current_balance: type: string is_active: type: boolean activated_at: type: - string - 'null' created_at: type: string updated_at: type: string bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' timeframe: type: string enum: - 1m - 3m - 5m - 15m required: - id - user_id - pair_id - strategy_id - initial_deposit - realized_pnl - is_active - activated_at - created_at - updated_at - bias - reinvest_earnings - risk_percent - timeframe '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/strategy/pairs: get: tags: - Strategy security: - InternalToken: [] responses: '200': description: 200 OK content: application/json: schema: type: array items: type: object properties: pair: type: object properties: id: type: number base_coin: type: string quote_coin: type: string created_at: type: string updated_at: type: string required: - id - base_coin - quote_coin - created_at - updated_at strategy: type: object properties: id: type: number pair_id: type: number ticker: type: string timeframe: type: string enum: - 1m - 3m - 5m - 15m instrument: type: - string - 'null' risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean max_deviation: type: string out_of_deviation: type: string period: type: number rr_ratio: type: string avg_sl: type: string leverage: type: number is_active: type: boolean total_pnl_percent: type: string pnl_7d_percent: type: string apy_percent: type: string trades_7d: type: string default: '0' trades_365d: type: string default: '0' trade_number_from: type: string default: '0' trade_number_to: type: string default: '0' base_coin: type: string quote_coin: type: string created_at: type: string updated_at: type: string required: - id - pair_id - ticker - timeframe - instrument - risk_percent - bias - reinvest_earnings - max_deviation - out_of_deviation - period - rr_ratio - avg_sl - leverage - is_active - total_pnl_percent - pnl_7d_percent - apy_percent - trades_7d - trades_365d - trade_number_from - trade_number_to - base_coin - quote_coin - created_at - updated_at totalSum: type: string totalLimit: type: - string - 'null' required: - pair - strategy - totalSum - totalLimit '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/strategy/best: get: tags: - Strategy security: - InternalToken: [] responses: '200': description: 200 OK content: application/json: schema: type: array items: type: object properties: id: type: number pair_id: type: number ticker: type: string timeframe: type: string enum: - 1m - 3m - 5m - 15m instrument: type: - string - 'null' risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean max_deviation: type: string out_of_deviation: type: string period: type: number rr_ratio: type: string avg_sl: type: string leverage: type: number is_active: type: boolean total_pnl_percent: type: string pnl_7d_percent: type: string apy_percent: type: string trades_7d: type: string default: '0' trades_365d: type: string default: '0' trade_number_from: type: string default: '0' trade_number_to: type: string default: '0' base_coin: type: string quote_coin: type: string created_at: type: string updated_at: type: string required: - id - pair_id - ticker - timeframe - instrument - risk_percent - bias - reinvest_earnings - max_deviation - out_of_deviation - period - rr_ratio - avg_sl - leverage - is_active - total_pnl_percent - pnl_7d_percent - apy_percent - trades_7d - trades_365d - trade_number_from - trade_number_to - base_coin - quote_coin - created_at - updated_at '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/strategy: get: tags: - Strategy security: - InternalToken: [] parameters: - in: query name: pair_id schema: type: integer exclusiveMinimum: 0 - in: query name: timeframe schema: type: string enum: - 1m - 3m - 5m - 15m - in: query name: bias schema: type: string enum: - long - short - neutral - in: query name: risk_percent schema: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' - in: query name: reinvest_earnings schema: type: string enum: - 'yes' - 'no' responses: '200': description: 200 OK content: application/json: schema: type: array items: type: object properties: id: type: number pair_id: type: number ticker: type: string timeframe: type: string enum: - 1m - 3m - 5m - 15m instrument: type: - string - 'null' risk_percent: type: string enum: - '0.50' - '1.00' - '2.00' - '3.00' - '5.00' bias: type: string enum: - long - short - neutral reinvest_earnings: type: boolean max_deviation: type: string out_of_deviation: type: string period: type: number rr_ratio: type: string avg_sl: type: string leverage: type: number is_active: type: boolean total_pnl_percent: type: string pnl_7d_percent: type: string apy_percent: type: string trades_7d: type: string default: '0' trades_365d: type: string default: '0' trade_number_from: type: string default: '0' trade_number_to: type: string default: '0' base_coin: type: string quote_coin: type: string created_at: type: string updated_at: type: string required: - id - pair_id - ticker - timeframe - instrument - risk_percent - bias - reinvest_earnings - max_deviation - out_of_deviation - period - rr_ratio - avg_sl - leverage - is_active - total_pnl_percent - pnl_7d_percent - apy_percent - trades_7d - trades_365d - trade_number_from - trade_number_to - base_coin - quote_coin - created_at - updated_at '400': description: 400 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 401 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '403': description: 403 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: 404 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '451': description: 451 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 500 Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: ErrorResponse: type: object properties: message: type: string description: Error message required: - message description: Error response securitySchemes: InternalToken: type: http scheme: bearer