update refactor
This commit is contained in:
parent
01abc7e446
commit
55ad0607f3
39 changed files with 4304 additions and 584 deletions
94
openapi.yaml
Normal file
94
openapi.yaml
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue