-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnofxos.go
More file actions
377 lines (326 loc) · 11.4 KB
/
Copy pathnofxos.go
File metadata and controls
377 lines (326 loc) · 11.4 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
// Auto-generated by claw402 codegen — DO NOT EDIT
// Provider: nofxos.ai (nofxos)
package claw402
import (
"context"
"encoding/json"
)
// NofxosAi500 provides methods for Nofxos ai500 endpoints.
type NofxosAi500 struct {
client *Client
}
// NofxosAi500ListParams are the query parameters for List.
type NofxosAi500ListParams struct {
Limit string `json:"limit,omitempty"`
}
// AI500 high-potential coins list (AI Score > 70) — $0.001/call
func (r *NofxosAi500) List(ctx context.Context, params *NofxosAi500ListParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/ai500/list", q)
}
// AI500 index overall statistics — $0.001/call
func (r *NofxosAi500) Stats(ctx context.Context) (json.RawMessage, error) {
return r.client.get(ctx, "/api/v1/nofx/ai500/stats", nil)
}
// NofxosAi300 provides methods for Nofxos ai300 endpoints.
type NofxosAi300 struct {
client *Client
}
// NofxosAi300ListParams are the query parameters for List.
type NofxosAi300ListParams struct {
Limit string `json:"limit,omitempty"`
}
// AI300 quant model rankings (by fund flow strength) — $0.001/call
func (r *NofxosAi300) List(ctx context.Context, params *NofxosAi300ListParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/ai300/list", q)
}
// AI300 model statistics (by signal strength distribution) — $0.001/call
func (r *NofxosAi300) Stats(ctx context.Context) (json.RawMessage, error) {
return r.client.get(ctx, "/api/v1/nofx/ai300/stats", nil)
}
// NofxosOi provides methods for Nofxos oi endpoints.
type NofxosOi struct {
client *Client
}
// NofxosOiTopRankingParams are the query parameters for TopRanking.
type NofxosOiTopRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
}
// Top open interest increase rankings — $0.001/call
func (r *NofxosOi) TopRanking(ctx context.Context, params *NofxosOiTopRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
return r.client.get(ctx, "/api/v1/nofx/oi/top-ranking", q)
}
// NofxosOiLowRankingParams are the query parameters for LowRanking.
type NofxosOiLowRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
}
// Top open interest decrease rankings — $0.001/call
func (r *NofxosOi) LowRanking(ctx context.Context, params *NofxosOiLowRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
return r.client.get(ctx, "/api/v1/nofx/oi/low-ranking", q)
}
// NofxosNetflow provides methods for Nofxos netflow endpoints.
type NofxosNetflow struct {
client *Client
}
// NofxosNetflowTopRankingParams are the query parameters for TopRanking.
type NofxosNetflowTopRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
Type string `json:"type,omitempty"`
Trade string `json:"trade,omitempty"`
}
// Top net capital inflow rankings — $0.001/call
func (r *NofxosNetflow) TopRanking(ctx context.Context, params *NofxosNetflowTopRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
if params != nil && params.Type != "" {
q["type"] = params.Type
}
if params != nil && params.Trade != "" {
q["trade"] = params.Trade
}
return r.client.get(ctx, "/api/v1/nofx/netflow/top-ranking", q)
}
// NofxosNetflowLowRankingParams are the query parameters for LowRanking.
type NofxosNetflowLowRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
Type string `json:"type,omitempty"`
Trade string `json:"trade,omitempty"`
}
// Top net capital outflow rankings — $0.001/call
func (r *NofxosNetflow) LowRanking(ctx context.Context, params *NofxosNetflowLowRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
if params != nil && params.Type != "" {
q["type"] = params.Type
}
if params != nil && params.Trade != "" {
q["trade"] = params.Trade
}
return r.client.get(ctx, "/api/v1/nofx/netflow/low-ranking", q)
}
// NofxosPrice provides methods for Nofxos price endpoints.
type NofxosPrice struct {
client *Client
}
// NofxosPriceRankingParams are the query parameters for Ranking.
type NofxosPriceRankingParams struct {
Duration string `json:"duration,omitempty"`
}
// Price change rankings (gainers & losers) — $0.001/call
func (r *NofxosPrice) Ranking(ctx context.Context, params *NofxosPriceRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
return r.client.get(ctx, "/api/v1/nofx/price/ranking", q)
}
// NofxosLongShort provides methods for Nofxos longShort endpoints.
type NofxosLongShort struct {
client *Client
}
// NofxosLongShortListParams are the query parameters for List.
type NofxosLongShortListParams struct {
Limit string `json:"limit,omitempty"`
}
// Long/short ratio anomaly coin list — $0.001/call
func (r *NofxosLongShort) List(ctx context.Context, params *NofxosLongShortListParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/long-short/list", q)
}
// NofxosFundingRate provides methods for Nofxos fundingRate endpoints.
type NofxosFundingRate struct {
client *Client
}
// NofxosFundingRateTopParams are the query parameters for Top.
type NofxosFundingRateTopParams struct {
Limit string `json:"limit,omitempty"`
}
// Top positive funding rate rankings — $0.001/call
func (r *NofxosFundingRate) Top(ctx context.Context, params *NofxosFundingRateTopParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/funding-rate/top", q)
}
// NofxosFundingRateLowParams are the query parameters for Low.
type NofxosFundingRateLowParams struct {
Limit string `json:"limit,omitempty"`
}
// Top negative funding rate rankings — $0.001/call
func (r *NofxosFundingRate) Low(ctx context.Context, params *NofxosFundingRateLowParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/funding-rate/low", q)
}
// NofxosOiCap provides methods for Nofxos oiCap endpoints.
type NofxosOiCap struct {
client *Client
}
// NofxosOiCapRankingParams are the query parameters for Ranking.
type NofxosOiCapRankingParams struct {
Limit string `json:"limit,omitempty"`
}
// Open interest market cap rankings — $0.001/call
func (r *NofxosOiCap) Ranking(ctx context.Context, params *NofxosOiCapRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/oi-cap/ranking", q)
}
// NofxosUpbit provides methods for Nofxos upbit endpoints.
type NofxosUpbit struct {
client *Client
}
// NofxosUpbitHotParams are the query parameters for Hot.
type NofxosUpbitHotParams struct {
Limit string `json:"limit,omitempty"`
}
// Upbit hot coins rankings (by trading volume) — $0.001/call
func (r *NofxosUpbit) Hot(ctx context.Context, params *NofxosUpbitHotParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/upbit/hot", q)
}
// NofxosUpbitNetflowTopRankingParams are the query parameters for NetflowTopRanking.
type NofxosUpbitNetflowTopRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
}
// Upbit net inflow rankings — $0.001/call
func (r *NofxosUpbit) NetflowTopRanking(ctx context.Context, params *NofxosUpbitNetflowTopRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
return r.client.get(ctx, "/api/v1/nofx/upbit/netflow/top-ranking", q)
}
// NofxosUpbitNetflowLowRankingParams are the query parameters for NetflowLowRanking.
type NofxosUpbitNetflowLowRankingParams struct {
Limit string `json:"limit,omitempty"`
Duration string `json:"duration,omitempty"`
}
// Upbit net outflow rankings — $0.001/call
func (r *NofxosUpbit) NetflowLowRanking(ctx context.Context, params *NofxosUpbitNetflowLowRankingParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
if params != nil && params.Duration != "" {
q["duration"] = params.Duration
}
return r.client.get(ctx, "/api/v1/nofx/upbit/netflow/low-ranking", q)
}
// NofxosHeatmap provides methods for Nofxos heatmap endpoints.
type NofxosHeatmap struct {
client *Client
}
// NofxosHeatmapListParams are the query parameters for List.
type NofxosHeatmapListParams struct {
Trade string `json:"trade,omitempty"`
Limit string `json:"limit,omitempty"`
}
// Order book heatmap overview (all coins) — $0.001/call
func (r *NofxosHeatmap) List(ctx context.Context, params *NofxosHeatmapListParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Trade != "" {
q["trade"] = params.Trade
}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/heatmap/list", q)
}
// NofxosQueryRank provides methods for Nofxos queryRank endpoints.
type NofxosQueryRank struct {
client *Client
}
// NofxosQueryRankListParams are the query parameters for List.
type NofxosQueryRankListParams struct {
Limit string `json:"limit,omitempty"`
}
// Today's most searched coin rankings — $0.001/call
func (r *NofxosQueryRank) List(ctx context.Context, params *NofxosQueryRankListParams) (json.RawMessage, error) {
q := map[string]string{}
if params != nil && params.Limit != "" {
q["limit"] = params.Limit
}
return r.client.get(ctx, "/api/v1/nofx/query-rank/list", q)
}
// NofxosResource provides access to all nofxos.ai API endpoints.
type NofxosResource struct {
client *Client
Ai500 *NofxosAi500
Ai300 *NofxosAi300
Oi *NofxosOi
Netflow *NofxosNetflow
Price *NofxosPrice
LongShort *NofxosLongShort
FundingRate *NofxosFundingRate
OiCap *NofxosOiCap
Upbit *NofxosUpbit
Heatmap *NofxosHeatmap
QueryRank *NofxosQueryRank
}
func newNofxosResource(c *Client) *NofxosResource {
return &NofxosResource{
client: c,
Ai500: &NofxosAi500{client: c},
Ai300: &NofxosAi300{client: c},
Oi: &NofxosOi{client: c},
Netflow: &NofxosNetflow{client: c},
Price: &NofxosPrice{client: c},
LongShort: &NofxosLongShort{client: c},
FundingRate: &NofxosFundingRate{client: c},
OiCap: &NofxosOiCap{client: c},
Upbit: &NofxosUpbit{client: c},
Heatmap: &NofxosHeatmap{client: c},
QueryRank: &NofxosQueryRank{client: c},
}
}