File size: 1,566 Bytes
7b54172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
openapi: 3.1.0
info:
  title: GateGPT Live API
  version: 1.0.0
servers:
  - url: https://luguog--gate4.hf.space
paths:
  /balance:
    get:
      operationId: getBalance
      summary: Get live balance from Gate.io
      responses:
        '200':
          description: Balance response
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance:
                    type: number
  /performance:
    get:
      operationId: getPerformance
      summary: Get trading PnL summary
      responses:
        '200':
          description: PnL summary
          content:
            application/json:
              schema:
                type: object
                properties:
                  summary:
                    type: string
  /log_trade:
    post:
      operationId: logTrade
      summary: Log a trade
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - action
                - contract
                - size
                - price
                - pnl_estimate
                - reason
              properties:
                action: { type: string }
                contract: { type: string }
                size: { type: number }
                price: { type: number }
                pnl_estimate: { type: number }
                reason: { type: string }
      responses:
        '200':
          description: Trade logged