zklighter-perps 1.0.275 → 1.0.276
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +3 -3
- package/apis/ReferralApi.ts +56 -56
- package/models/ReferralStat.ts +86 -0
- package/models/ReferralStats.ts +85 -0
- package/models/ReqGetReferralStats.ts +69 -0
- package/models/index.ts +3 -3
- package/openapi.json +95 -95
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -128,9 +128,9 @@ models/Referral.ts
|
|
|
128
128
|
models/ReferralCode.ts
|
|
129
129
|
models/ReferralPointEntry.ts
|
|
130
130
|
models/ReferralPoints.ts
|
|
131
|
+
models/ReferralStat.ts
|
|
132
|
+
models/ReferralStats.ts
|
|
131
133
|
models/ReferralTotals.ts
|
|
132
|
-
models/ReferralWeeklyStat.ts
|
|
133
|
-
models/ReferralWeeklyStats.ts
|
|
134
134
|
models/ReqDoFaucet.ts
|
|
135
135
|
models/ReqExportData.ts
|
|
136
136
|
models/ReqGetAccount.ts
|
|
@@ -183,7 +183,7 @@ models/ReqGetRangeWithIndexSortable.ts
|
|
|
183
183
|
models/ReqGetRecentTrades.ts
|
|
184
184
|
models/ReqGetReferralCode.ts
|
|
185
185
|
models/ReqGetReferralPoints.ts
|
|
186
|
-
models/
|
|
186
|
+
models/ReqGetReferralStats.ts
|
|
187
187
|
models/ReqGetRollingInfo.ts
|
|
188
188
|
models/ReqGetStockFinancials.ts
|
|
189
189
|
models/ReqGetSyntheticSpotInfo.ts
|
package/apis/ReferralApi.ts
CHANGED
|
@@ -17,7 +17,7 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
ReferralCode,
|
|
19
19
|
ReferralPoints,
|
|
20
|
-
|
|
20
|
+
ReferralStats,
|
|
21
21
|
RespUpdateKickback,
|
|
22
22
|
RespUpdateReferralCode,
|
|
23
23
|
ResultCode,
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
ReferralCodeToJSON,
|
|
29
29
|
ReferralPointsFromJSON,
|
|
30
30
|
ReferralPointsToJSON,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
ReferralStatsFromJSON,
|
|
32
|
+
ReferralStatsToJSON,
|
|
33
33
|
RespUpdateKickbackFromJSON,
|
|
34
34
|
RespUpdateKickbackToJSON,
|
|
35
35
|
RespUpdateReferralCodeFromJSON,
|
|
@@ -65,6 +65,12 @@ export interface ReferralPointsRequest {
|
|
|
65
65
|
auth?: string;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
export interface ReferralStatsRequest {
|
|
69
|
+
l1_address: string;
|
|
70
|
+
authorization?: string;
|
|
71
|
+
auth?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
68
74
|
export interface ReferralUpdateRequest {
|
|
69
75
|
account_index: number;
|
|
70
76
|
new_referral_code: string;
|
|
@@ -93,12 +99,6 @@ export interface ReferralUserReferralsRequest {
|
|
|
93
99
|
stats_end_timestamp?: number;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
|
-
export interface ReferralWeeklyStatsRequest {
|
|
97
|
-
l1_address: string;
|
|
98
|
-
authorization?: string;
|
|
99
|
-
auth?: string;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
102
|
/**
|
|
103
103
|
*
|
|
104
104
|
*/
|
|
@@ -333,6 +333,53 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
333
333
|
return await response.value();
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
+
/**
|
|
337
|
+
* Get trade stats summed across a referrer\'s referred users
|
|
338
|
+
* referral_stats
|
|
339
|
+
*/
|
|
340
|
+
async referralStatsRaw(requestParameters: ReferralStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReferralStats>> {
|
|
341
|
+
if (requestParameters['l1_address'] == null) {
|
|
342
|
+
throw new runtime.RequiredError(
|
|
343
|
+
'l1_address',
|
|
344
|
+
'Required parameter "l1_address" was null or undefined when calling referralStats().'
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const queryParameters: any = {};
|
|
349
|
+
|
|
350
|
+
if (requestParameters['auth'] != null) {
|
|
351
|
+
queryParameters['auth'] = requestParameters['auth'];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (requestParameters['l1_address'] != null) {
|
|
355
|
+
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
359
|
+
|
|
360
|
+
if (requestParameters['authorization'] != null) {
|
|
361
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const response = await this.request({
|
|
365
|
+
path: `/api/v1/referral/stats`,
|
|
366
|
+
method: 'GET',
|
|
367
|
+
headers: headerParameters,
|
|
368
|
+
query: queryParameters,
|
|
369
|
+
}, initOverrides);
|
|
370
|
+
|
|
371
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ReferralStatsFromJSON(jsonValue));
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Get trade stats summed across a referrer\'s referred users
|
|
376
|
+
* referral_stats
|
|
377
|
+
*/
|
|
378
|
+
async referralStats(requestParameters: ReferralStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReferralStats> {
|
|
379
|
+
const response = await this.referralStatsRaw(requestParameters, initOverrides);
|
|
380
|
+
return await response.value();
|
|
381
|
+
}
|
|
382
|
+
|
|
336
383
|
/**
|
|
337
384
|
* Update referral code (allowed once per account)
|
|
338
385
|
* referral_update
|
|
@@ -565,51 +612,4 @@ export class ReferralApi extends runtime.BaseAPI {
|
|
|
565
612
|
return await response.value();
|
|
566
613
|
}
|
|
567
614
|
|
|
568
|
-
/**
|
|
569
|
-
* Get weekly trade stats summed across a referrer\'s referred users
|
|
570
|
-
* referral_weeklyStats
|
|
571
|
-
*/
|
|
572
|
-
async referralWeeklyStatsRaw(requestParameters: ReferralWeeklyStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReferralWeeklyStats>> {
|
|
573
|
-
if (requestParameters['l1_address'] == null) {
|
|
574
|
-
throw new runtime.RequiredError(
|
|
575
|
-
'l1_address',
|
|
576
|
-
'Required parameter "l1_address" was null or undefined when calling referralWeeklyStats().'
|
|
577
|
-
);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
const queryParameters: any = {};
|
|
581
|
-
|
|
582
|
-
if (requestParameters['auth'] != null) {
|
|
583
|
-
queryParameters['auth'] = requestParameters['auth'];
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
if (requestParameters['l1_address'] != null) {
|
|
587
|
-
queryParameters['l1_address'] = requestParameters['l1_address'];
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
591
|
-
|
|
592
|
-
if (requestParameters['authorization'] != null) {
|
|
593
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
const response = await this.request({
|
|
597
|
-
path: `/api/v1/referral/weeklyStats`,
|
|
598
|
-
method: 'GET',
|
|
599
|
-
headers: headerParameters,
|
|
600
|
-
query: queryParameters,
|
|
601
|
-
}, initOverrides);
|
|
602
|
-
|
|
603
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => ReferralWeeklyStatsFromJSON(jsonValue));
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Get weekly trade stats summed across a referrer\'s referred users
|
|
608
|
-
* referral_weeklyStats
|
|
609
|
-
*/
|
|
610
|
-
async referralWeeklyStats(requestParameters: ReferralWeeklyStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReferralWeeklyStats> {
|
|
611
|
-
const response = await this.referralWeeklyStatsRaw(requestParameters, initOverrides);
|
|
612
|
-
return await response.value();
|
|
613
|
-
}
|
|
614
|
-
|
|
615
615
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { TradeStats } from './TradeStats';
|
|
17
|
+
import {
|
|
18
|
+
TradeStatsFromJSON,
|
|
19
|
+
TradeStatsFromJSONTyped,
|
|
20
|
+
TradeStatsToJSON,
|
|
21
|
+
} from './TradeStats';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ReferralStat
|
|
27
|
+
*/
|
|
28
|
+
export interface ReferralStat {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof ReferralStat
|
|
33
|
+
*/
|
|
34
|
+
start_timestamp: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof ReferralStat
|
|
39
|
+
*/
|
|
40
|
+
end_timestamp: number;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {TradeStats}
|
|
44
|
+
* @memberof ReferralStat
|
|
45
|
+
*/
|
|
46
|
+
trade_stats: TradeStats;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ReferralStat interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfReferralStat(value: object): value is ReferralStat {
|
|
53
|
+
if (!('start_timestamp' in value) || value['start_timestamp'] === undefined) return false;
|
|
54
|
+
if (!('end_timestamp' in value) || value['end_timestamp'] === undefined) return false;
|
|
55
|
+
if (!('trade_stats' in value) || value['trade_stats'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ReferralStatFromJSON(json: any): ReferralStat {
|
|
60
|
+
return ReferralStatFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ReferralStatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReferralStat {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'start_timestamp': json['start_timestamp'],
|
|
70
|
+
'end_timestamp': json['end_timestamp'],
|
|
71
|
+
'trade_stats': TradeStatsFromJSON(json['trade_stats']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ReferralStatToJSON(value?: ReferralStat | null): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'start_timestamp': value['start_timestamp'],
|
|
82
|
+
'end_timestamp': value['end_timestamp'],
|
|
83
|
+
'trade_stats': TradeStatsToJSON(value['trade_stats']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ReferralStat } from './ReferralStat';
|
|
17
|
+
import {
|
|
18
|
+
ReferralStatFromJSON,
|
|
19
|
+
ReferralStatFromJSONTyped,
|
|
20
|
+
ReferralStatToJSON,
|
|
21
|
+
} from './ReferralStat';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ReferralStats
|
|
27
|
+
*/
|
|
28
|
+
export interface ReferralStats {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof ReferralStats
|
|
33
|
+
*/
|
|
34
|
+
code: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof ReferralStats
|
|
39
|
+
*/
|
|
40
|
+
message?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<ReferralStat>}
|
|
44
|
+
* @memberof ReferralStats
|
|
45
|
+
*/
|
|
46
|
+
stats: Array<ReferralStat>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the ReferralStats interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfReferralStats(value: object): value is ReferralStats {
|
|
53
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
54
|
+
if (!('stats' in value) || value['stats'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ReferralStatsFromJSON(json: any): ReferralStats {
|
|
59
|
+
return ReferralStatsFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ReferralStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReferralStats {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'code': json['code'],
|
|
69
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
70
|
+
'stats': ((json['stats'] as Array<any>).map(ReferralStatFromJSON)),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function ReferralStatsToJSON(value?: ReferralStats | null): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'code': value['code'],
|
|
81
|
+
'message': value['message'],
|
|
82
|
+
'stats': ((value['stats'] as Array<any>).map(ReferralStatToJSON)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document:
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ReqGetReferralStats
|
|
20
|
+
*/
|
|
21
|
+
export interface ReqGetReferralStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ReqGetReferralStats
|
|
26
|
+
*/
|
|
27
|
+
auth?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ReqGetReferralStats
|
|
32
|
+
*/
|
|
33
|
+
l1_address: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ReqGetReferralStats interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfReqGetReferralStats(value: object): value is ReqGetReferralStats {
|
|
40
|
+
if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ReqGetReferralStatsFromJSON(json: any): ReqGetReferralStats {
|
|
45
|
+
return ReqGetReferralStatsFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ReqGetReferralStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetReferralStats {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'auth': json['auth'] == null ? undefined : json['auth'],
|
|
55
|
+
'l1_address': json['l1_address'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ReqGetReferralStatsToJSON(value?: ReqGetReferralStats | null): any {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'auth': value['auth'],
|
|
66
|
+
'l1_address': value['l1_address'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
package/models/index.ts
CHANGED
|
@@ -109,9 +109,9 @@ export * from './Referral';
|
|
|
109
109
|
export * from './ReferralCode';
|
|
110
110
|
export * from './ReferralPointEntry';
|
|
111
111
|
export * from './ReferralPoints';
|
|
112
|
+
export * from './ReferralStat';
|
|
113
|
+
export * from './ReferralStats';
|
|
112
114
|
export * from './ReferralTotals';
|
|
113
|
-
export * from './ReferralWeeklyStat';
|
|
114
|
-
export * from './ReferralWeeklyStats';
|
|
115
115
|
export * from './ReqDoFaucet';
|
|
116
116
|
export * from './ReqExportData';
|
|
117
117
|
export * from './ReqGetAccount';
|
|
@@ -164,7 +164,7 @@ export * from './ReqGetRangeWithIndexSortable';
|
|
|
164
164
|
export * from './ReqGetRecentTrades';
|
|
165
165
|
export * from './ReqGetReferralCode';
|
|
166
166
|
export * from './ReqGetReferralPoints';
|
|
167
|
-
export * from './
|
|
167
|
+
export * from './ReqGetReferralStats';
|
|
168
168
|
export * from './ReqGetRollingInfo';
|
|
169
169
|
export * from './ReqGetStockFinancials';
|
|
170
170
|
export * from './ReqGetSyntheticSpotInfo';
|
package/openapi.json
CHANGED
|
@@ -3829,6 +3829,53 @@
|
|
|
3829
3829
|
"description": "Get referral points"
|
|
3830
3830
|
}
|
|
3831
3831
|
},
|
|
3832
|
+
"/api/v1/referral/stats": {
|
|
3833
|
+
"get": {
|
|
3834
|
+
"summary": "referral_stats",
|
|
3835
|
+
"operationId": "referral_stats",
|
|
3836
|
+
"responses": {
|
|
3837
|
+
"200": {
|
|
3838
|
+
"description": "A successful response.",
|
|
3839
|
+
"schema": {
|
|
3840
|
+
"$ref": "#/definitions/ReferralStats"
|
|
3841
|
+
}
|
|
3842
|
+
},
|
|
3843
|
+
"400": {
|
|
3844
|
+
"description": "Bad request",
|
|
3845
|
+
"schema": {
|
|
3846
|
+
"$ref": "#/definitions/ResultCode"
|
|
3847
|
+
}
|
|
3848
|
+
}
|
|
3849
|
+
},
|
|
3850
|
+
"parameters": [
|
|
3851
|
+
{
|
|
3852
|
+
"name": "authorization",
|
|
3853
|
+
"in": "header",
|
|
3854
|
+
"required": false,
|
|
3855
|
+
"type": "string"
|
|
3856
|
+
},
|
|
3857
|
+
{
|
|
3858
|
+
"name": "auth",
|
|
3859
|
+
"in": "query",
|
|
3860
|
+
"required": false,
|
|
3861
|
+
"type": "string"
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
"name": "l1_address",
|
|
3865
|
+
"in": "query",
|
|
3866
|
+
"required": true,
|
|
3867
|
+
"type": "string"
|
|
3868
|
+
}
|
|
3869
|
+
],
|
|
3870
|
+
"tags": [
|
|
3871
|
+
"referral"
|
|
3872
|
+
],
|
|
3873
|
+
"consumes": [
|
|
3874
|
+
"multipart/form-data"
|
|
3875
|
+
],
|
|
3876
|
+
"description": "Get trade stats summed across a referrer's referred users"
|
|
3877
|
+
}
|
|
3878
|
+
},
|
|
3832
3879
|
"/api/v1/referral/update": {
|
|
3833
3880
|
"post": {
|
|
3834
3881
|
"summary": "referral_update",
|
|
@@ -3993,53 +4040,6 @@
|
|
|
3993
4040
|
"description": "Get user referrals"
|
|
3994
4041
|
}
|
|
3995
4042
|
},
|
|
3996
|
-
"/api/v1/referral/weeklyStats": {
|
|
3997
|
-
"get": {
|
|
3998
|
-
"summary": "referral_weeklyStats",
|
|
3999
|
-
"operationId": "referral_weeklyStats",
|
|
4000
|
-
"responses": {
|
|
4001
|
-
"200": {
|
|
4002
|
-
"description": "A successful response.",
|
|
4003
|
-
"schema": {
|
|
4004
|
-
"$ref": "#/definitions/ReferralWeeklyStats"
|
|
4005
|
-
}
|
|
4006
|
-
},
|
|
4007
|
-
"400": {
|
|
4008
|
-
"description": "Bad request",
|
|
4009
|
-
"schema": {
|
|
4010
|
-
"$ref": "#/definitions/ResultCode"
|
|
4011
|
-
}
|
|
4012
|
-
}
|
|
4013
|
-
},
|
|
4014
|
-
"parameters": [
|
|
4015
|
-
{
|
|
4016
|
-
"name": "authorization",
|
|
4017
|
-
"in": "header",
|
|
4018
|
-
"required": false,
|
|
4019
|
-
"type": "string"
|
|
4020
|
-
},
|
|
4021
|
-
{
|
|
4022
|
-
"name": "auth",
|
|
4023
|
-
"in": "query",
|
|
4024
|
-
"required": false,
|
|
4025
|
-
"type": "string"
|
|
4026
|
-
},
|
|
4027
|
-
{
|
|
4028
|
-
"name": "l1_address",
|
|
4029
|
-
"in": "query",
|
|
4030
|
-
"required": true,
|
|
4031
|
-
"type": "string"
|
|
4032
|
-
}
|
|
4033
|
-
],
|
|
4034
|
-
"tags": [
|
|
4035
|
-
"referral"
|
|
4036
|
-
],
|
|
4037
|
-
"consumes": [
|
|
4038
|
-
"multipart/form-data"
|
|
4039
|
-
],
|
|
4040
|
-
"description": "Get weekly trade stats summed across a referrer's referred users"
|
|
4041
|
-
}
|
|
4042
|
-
},
|
|
4043
4043
|
"/api/v1/rfq/create": {
|
|
4044
4044
|
"post": {
|
|
4045
4045
|
"summary": "rfq_create",
|
|
@@ -10556,6 +10556,52 @@
|
|
|
10556
10556
|
"reward_point_multiplier"
|
|
10557
10557
|
]
|
|
10558
10558
|
},
|
|
10559
|
+
"ReferralStat": {
|
|
10560
|
+
"type": "object",
|
|
10561
|
+
"properties": {
|
|
10562
|
+
"start_timestamp": {
|
|
10563
|
+
"type": "integer",
|
|
10564
|
+
"format": "int64"
|
|
10565
|
+
},
|
|
10566
|
+
"end_timestamp": {
|
|
10567
|
+
"type": "integer",
|
|
10568
|
+
"format": "int64"
|
|
10569
|
+
},
|
|
10570
|
+
"trade_stats": {
|
|
10571
|
+
"$ref": "#/definitions/TradeStats"
|
|
10572
|
+
}
|
|
10573
|
+
},
|
|
10574
|
+
"title": "ReferralStat",
|
|
10575
|
+
"required": [
|
|
10576
|
+
"start_timestamp",
|
|
10577
|
+
"end_timestamp",
|
|
10578
|
+
"trade_stats"
|
|
10579
|
+
]
|
|
10580
|
+
},
|
|
10581
|
+
"ReferralStats": {
|
|
10582
|
+
"type": "object",
|
|
10583
|
+
"properties": {
|
|
10584
|
+
"code": {
|
|
10585
|
+
"type": "integer",
|
|
10586
|
+
"format": "int32",
|
|
10587
|
+
"example": "200"
|
|
10588
|
+
},
|
|
10589
|
+
"message": {
|
|
10590
|
+
"type": "string"
|
|
10591
|
+
},
|
|
10592
|
+
"stats": {
|
|
10593
|
+
"type": "array",
|
|
10594
|
+
"items": {
|
|
10595
|
+
"$ref": "#/definitions/ReferralStat"
|
|
10596
|
+
}
|
|
10597
|
+
}
|
|
10598
|
+
},
|
|
10599
|
+
"title": "ReferralStats",
|
|
10600
|
+
"required": [
|
|
10601
|
+
"code",
|
|
10602
|
+
"stats"
|
|
10603
|
+
]
|
|
10604
|
+
},
|
|
10559
10605
|
"ReferralTotals": {
|
|
10560
10606
|
"type": "object",
|
|
10561
10607
|
"properties": {
|
|
@@ -10598,52 +10644,6 @@
|
|
|
10598
10644
|
"total_premium_referrals"
|
|
10599
10645
|
]
|
|
10600
10646
|
},
|
|
10601
|
-
"ReferralWeeklyStat": {
|
|
10602
|
-
"type": "object",
|
|
10603
|
-
"properties": {
|
|
10604
|
-
"start_timestamp": {
|
|
10605
|
-
"type": "integer",
|
|
10606
|
-
"format": "int64"
|
|
10607
|
-
},
|
|
10608
|
-
"end_timestamp": {
|
|
10609
|
-
"type": "integer",
|
|
10610
|
-
"format": "int64"
|
|
10611
|
-
},
|
|
10612
|
-
"trade_stats": {
|
|
10613
|
-
"$ref": "#/definitions/TradeStats"
|
|
10614
|
-
}
|
|
10615
|
-
},
|
|
10616
|
-
"title": "ReferralWeeklyStat",
|
|
10617
|
-
"required": [
|
|
10618
|
-
"start_timestamp",
|
|
10619
|
-
"end_timestamp",
|
|
10620
|
-
"trade_stats"
|
|
10621
|
-
]
|
|
10622
|
-
},
|
|
10623
|
-
"ReferralWeeklyStats": {
|
|
10624
|
-
"type": "object",
|
|
10625
|
-
"properties": {
|
|
10626
|
-
"code": {
|
|
10627
|
-
"type": "integer",
|
|
10628
|
-
"format": "int32",
|
|
10629
|
-
"example": "200"
|
|
10630
|
-
},
|
|
10631
|
-
"message": {
|
|
10632
|
-
"type": "string"
|
|
10633
|
-
},
|
|
10634
|
-
"weeks": {
|
|
10635
|
-
"type": "array",
|
|
10636
|
-
"items": {
|
|
10637
|
-
"$ref": "#/definitions/ReferralWeeklyStat"
|
|
10638
|
-
}
|
|
10639
|
-
}
|
|
10640
|
-
},
|
|
10641
|
-
"title": "ReferralWeeklyStats",
|
|
10642
|
-
"required": [
|
|
10643
|
-
"code",
|
|
10644
|
-
"weeks"
|
|
10645
|
-
]
|
|
10646
|
-
},
|
|
10647
10647
|
"ReqAckNotif": {
|
|
10648
10648
|
"type": "object",
|
|
10649
10649
|
"properties": {
|
|
@@ -12159,7 +12159,7 @@
|
|
|
12159
12159
|
"account_index"
|
|
12160
12160
|
]
|
|
12161
12161
|
},
|
|
12162
|
-
"
|
|
12162
|
+
"ReqGetReferralStats": {
|
|
12163
12163
|
"type": "object",
|
|
12164
12164
|
"properties": {
|
|
12165
12165
|
"auth": {
|
|
@@ -12169,7 +12169,7 @@
|
|
|
12169
12169
|
"type": "string"
|
|
12170
12170
|
}
|
|
12171
12171
|
},
|
|
12172
|
-
"title": "
|
|
12172
|
+
"title": "ReqGetReferralStats",
|
|
12173
12173
|
"required": [
|
|
12174
12174
|
"l1_address"
|
|
12175
12175
|
]
|