94 lines
No EOL
2.1 KiB
YAML
94 lines
No EOL
2.1 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: AI Trading System API
|
|
version: 1.0.0
|
|
paths:
|
|
/api/user/credential:
|
|
post:
|
|
summary: Lưu credential Bybit cho user
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
userId:
|
|
type: string
|
|
apiKey:
|
|
type: string
|
|
apiSecret:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
get:
|
|
summary: Lấy credential Bybit theo userId
|
|
parameters:
|
|
- in: path
|
|
name: userId
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
/api/orders:
|
|
post:
|
|
summary: Tạo order mới
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
symbol:
|
|
type: string
|
|
side:
|
|
type: string
|
|
qty:
|
|
type: number
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
get:
|
|
summary: Lấy danh sách order
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
/api/orders/{orderId}:
|
|
delete:
|
|
summary: Huỷ order
|
|
parameters:
|
|
- in: path
|
|
name: orderId
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
/api/positions:
|
|
get:
|
|
summary: Lấy vị thế hiện tại
|
|
responses:
|
|
'200':
|
|
description: Thành công
|
|
/api/candles/{symbol}/{interval}:
|
|
get:
|
|
summary: Phân tích nến với EMA, MACD
|
|
parameters:
|
|
- in: path
|
|
name: symbol
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- in: path
|
|
name: interval
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Thành công |