@chainstream-io/sdk 0.0.9 → 0.0.10
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/dist/api/stream.js +24 -6
- package/dist/api/stream.js.map +1 -1
- package/dist/api/stream.model.d.ts +2 -0
- package/dist/api/stream.model.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/openapi/apis/DexApi.d.ts +5 -2
- package/dist/openapi/apis/DexApi.js +79 -4
- package/dist/openapi/apis/DexApi.js.map +1 -1
- package/dist/openapi/apis/TradeApi.d.ts +3 -1
- package/dist/openapi/apis/TradeApi.js +76 -1
- package/dist/openapi/apis/TradeApi.js.map +1 -1
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js.map +1 -1
- package/dist/openapi/models/CreateTokenInput.d.ts +34 -0
- package/dist/openapi/models/CreateTokenInput.js +72 -0
- package/dist/openapi/models/CreateTokenInput.js.map +1 -0
- package/dist/openapi/models/ObjectSerializer.d.ts +2 -1
- package/dist/openapi/models/ObjectSerializer.js +7 -4
- package/dist/openapi/models/ObjectSerializer.js.map +1 -1
- package/dist/openapi/models/QuoteResponse.d.ts +25 -0
- package/dist/openapi/models/QuoteResponse.js +52 -0
- package/dist/openapi/models/QuoteResponse.js.map +1 -0
- package/dist/openapi/models/TradeDetailDTO.d.ts +1 -1
- package/dist/openapi/models/TradeDetailDTO.js +2 -2
- package/dist/openapi/models/TradeDetailDTO.js.map +1 -1
- package/dist/openapi/models/all.d.ts +2 -1
- package/dist/openapi/models/all.js +2 -1
- package/dist/openapi/models/all.js.map +1 -1
- package/dist/openapi/types/ObjectParamAPI.d.ts +31 -2
- package/dist/openapi/types/ObjectParamAPI.js +16 -4
- package/dist/openapi/types/ObjectParamAPI.js.map +1 -1
- package/dist/openapi/types/ObservableAPI.d.ts +10 -5
- package/dist/openapi/types/ObservableAPI.js +44 -8
- package/dist/openapi/types/ObservableAPI.js.map +1 -1
- package/dist/openapi/types/PromiseAPI.d.ts +10 -5
- package/dist/openapi/types/PromiseAPI.js +24 -8
- package/dist/openapi/types/PromiseAPI.js.map +1 -1
- package/package.json +1 -1
- package/src/api/stream.model.ts +2 -0
- package/src/api/stream.ts +17 -3
- package/src/index.ts +1 -1
- package/src/openapi/.openapi-generator/FILES +2 -1
- package/src/openapi/apis/DexApi.ts +149 -7
- package/src/openapi/apis/TradeApi.ts +154 -1
- package/src/openapi/index.ts +1 -1
- package/src/openapi/models/{DexCreateTokenInput.ts → CreateTokenInput.ts} +5 -5
- package/src/openapi/models/ObjectSerializer.ts +7 -4
- package/src/openapi/models/QuoteResponse.ts +89 -0
- package/src/openapi/models/TradeDetailDTO.ts +4 -4
- package/src/openapi/models/all.ts +2 -1
- package/src/openapi/types/ObjectParamAPI.ts +192 -7
- package/src/openapi/types/ObservableAPI.ts +114 -11
- package/src/openapi/types/PromiseAPI.ts +88 -11
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
import { HttpFile } from '../http/http';
|
|
14
14
|
|
|
15
|
-
export class
|
|
15
|
+
export class CreateTokenInput {
|
|
16
16
|
/**
|
|
17
17
|
* DTO.DEX.IDENTIFIER
|
|
18
18
|
*/
|
|
19
|
-
'dex':
|
|
19
|
+
'dex': CreateTokenInputDexEnum;
|
|
20
20
|
/**
|
|
21
21
|
* DTO.DEX.WALLET
|
|
22
22
|
*/
|
|
@@ -54,7 +54,7 @@ export class DexCreateTokenInput {
|
|
|
54
54
|
{
|
|
55
55
|
"name": "dex",
|
|
56
56
|
"baseName": "dex",
|
|
57
|
-
"type": "
|
|
57
|
+
"type": "CreateTokenInputDexEnum",
|
|
58
58
|
"format": ""
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -101,14 +101,14 @@ export class DexCreateTokenInput {
|
|
|
101
101
|
} ];
|
|
102
102
|
|
|
103
103
|
static getAttributeTypeMap() {
|
|
104
|
-
return
|
|
104
|
+
return CreateTokenInput.attributeTypeMap;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
public constructor() {
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
export enum
|
|
111
|
+
export enum CreateTokenInputDexEnum {
|
|
112
112
|
Raydium = 'raydium',
|
|
113
113
|
Pumpfun = 'pumpfun',
|
|
114
114
|
Moonshot = 'moonshot',
|
|
@@ -4,8 +4,8 @@ export * from '../models/Candle';
|
|
|
4
4
|
export * from '../models/ClaimRedPacketInput';
|
|
5
5
|
export * from '../models/CreateRedPacketInput';
|
|
6
6
|
export * from '../models/CreateRedPacketReply';
|
|
7
|
+
export * from '../models/CreateTokenInput';
|
|
7
8
|
export * from '../models/CreateTokenReply';
|
|
8
|
-
export * from '../models/DexCreateTokenInput';
|
|
9
9
|
export * from '../models/DexDTO';
|
|
10
10
|
export * from '../models/DexPage';
|
|
11
11
|
export * from '../models/DexPoolDTO';
|
|
@@ -19,6 +19,7 @@ export * from '../models/MoonshotSubmitCreateToken200Response';
|
|
|
19
19
|
export * from '../models/MoonshotSubmitCreateTokenInput';
|
|
20
20
|
export * from '../models/PumpCreateTokenInput';
|
|
21
21
|
export * from '../models/PumpCreateTokenReply';
|
|
22
|
+
export * from '../models/QuoteResponse';
|
|
22
23
|
export * from '../models/RedPacketClaimDTO';
|
|
23
24
|
export * from '../models/RedPacketClaimsPage';
|
|
24
25
|
export * from '../models/RedPacketDTO';
|
|
@@ -64,8 +65,8 @@ import { Candle } from '../models/Candle';
|
|
|
64
65
|
import { ClaimRedPacketInput } from '../models/ClaimRedPacketInput';
|
|
65
66
|
import { CreateRedPacketInput } from '../models/CreateRedPacketInput';
|
|
66
67
|
import { CreateRedPacketReply } from '../models/CreateRedPacketReply';
|
|
68
|
+
import { CreateTokenInput, CreateTokenInputDexEnum } from '../models/CreateTokenInput';
|
|
67
69
|
import { CreateTokenReply } from '../models/CreateTokenReply';
|
|
68
|
-
import { DexCreateTokenInput, DexCreateTokenInputDexEnum } from '../models/DexCreateTokenInput';
|
|
69
70
|
import { DexDTO } from '../models/DexDTO';
|
|
70
71
|
import { DexPage } from '../models/DexPage';
|
|
71
72
|
import { DexPoolDTO } from '../models/DexPoolDTO';
|
|
@@ -79,6 +80,7 @@ import { MoonshotSubmitCreateToken200Response } from '../models/MoonshotSubmitCr
|
|
|
79
80
|
import { MoonshotSubmitCreateTokenInput } from '../models/MoonshotSubmitCreateTokenInput';
|
|
80
81
|
import { PumpCreateTokenInput, PumpCreateTokenInputDexEnum , PumpCreateTokenInputMigrationDexEnum } from '../models/PumpCreateTokenInput';
|
|
81
82
|
import { PumpCreateTokenReply } from '../models/PumpCreateTokenReply';
|
|
83
|
+
import { QuoteResponse } from '../models/QuoteResponse';
|
|
82
84
|
import { RedPacketClaimDTO , RedPacketClaimDTOChainEnum } from '../models/RedPacketClaimDTO';
|
|
83
85
|
import { RedPacketClaimsPage } from '../models/RedPacketClaimsPage';
|
|
84
86
|
import { RedPacketDTO, RedPacketDTOChainEnum } from '../models/RedPacketDTO';
|
|
@@ -131,7 +133,7 @@ let primitives = [
|
|
|
131
133
|
];
|
|
132
134
|
|
|
133
135
|
let enumsMap: Set<string> = new Set<string>([
|
|
134
|
-
"
|
|
136
|
+
"CreateTokenInputDexEnum",
|
|
135
137
|
"FilterConditionFieldEnum",
|
|
136
138
|
"LinkLabelEnum",
|
|
137
139
|
"MoonshotCreateTokenInputDexEnum",
|
|
@@ -157,8 +159,8 @@ let typeMap: {[index: string]: any} = {
|
|
|
157
159
|
"ClaimRedPacketInput": ClaimRedPacketInput,
|
|
158
160
|
"CreateRedPacketInput": CreateRedPacketInput,
|
|
159
161
|
"CreateRedPacketReply": CreateRedPacketReply,
|
|
162
|
+
"CreateTokenInput": CreateTokenInput,
|
|
160
163
|
"CreateTokenReply": CreateTokenReply,
|
|
161
|
-
"DexCreateTokenInput": DexCreateTokenInput,
|
|
162
164
|
"DexDTO": DexDTO,
|
|
163
165
|
"DexPage": DexPage,
|
|
164
166
|
"DexPoolDTO": DexPoolDTO,
|
|
@@ -172,6 +174,7 @@ let typeMap: {[index: string]: any} = {
|
|
|
172
174
|
"MoonshotSubmitCreateTokenInput": MoonshotSubmitCreateTokenInput,
|
|
173
175
|
"PumpCreateTokenInput": PumpCreateTokenInput,
|
|
174
176
|
"PumpCreateTokenReply": PumpCreateTokenReply,
|
|
177
|
+
"QuoteResponse": QuoteResponse,
|
|
175
178
|
"RedPacketClaimDTO": RedPacketClaimDTO,
|
|
176
179
|
"RedPacketClaimsPage": RedPacketClaimsPage,
|
|
177
180
|
"RedPacketDTO": RedPacketDTO,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dex Aggregator API
|
|
3
|
+
* Dex Aggregator API ⚡️
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 1.0
|
|
6
|
+
* Contact: ai@sx.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpFile } from '../http/http';
|
|
14
|
+
|
|
15
|
+
export class QuoteResponse {
|
|
16
|
+
/**
|
|
17
|
+
* DTO.DEX.QUOTE.AMOUNT_OUT
|
|
18
|
+
*/
|
|
19
|
+
'amountOut'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* DTO.DEX.QUOTE.MIN_AMOUNT_OUT
|
|
22
|
+
*/
|
|
23
|
+
'minAmountOut'?: string;
|
|
24
|
+
/**
|
|
25
|
+
* DTO.DEX.QUOTE.CURRENT_PRICE
|
|
26
|
+
*/
|
|
27
|
+
'currentPrice'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* DTO.DEX.QUOTE.EXECUTION_PRICE
|
|
30
|
+
*/
|
|
31
|
+
'executionPrice'?: string;
|
|
32
|
+
/**
|
|
33
|
+
* DTO.DEX.QUOTE.PRICE_IMPACT
|
|
34
|
+
*/
|
|
35
|
+
'priceImpact'?: string;
|
|
36
|
+
/**
|
|
37
|
+
* DTO.DEX.QUOTE.FEE
|
|
38
|
+
*/
|
|
39
|
+
'fee'?: string;
|
|
40
|
+
|
|
41
|
+
static readonly discriminator: string | undefined = undefined;
|
|
42
|
+
|
|
43
|
+
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
|
44
|
+
|
|
45
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
46
|
+
{
|
|
47
|
+
"name": "amountOut",
|
|
48
|
+
"baseName": "amountOut",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"format": ""
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "minAmountOut",
|
|
54
|
+
"baseName": "minAmountOut",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"format": ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "currentPrice",
|
|
60
|
+
"baseName": "currentPrice",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"format": ""
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "executionPrice",
|
|
66
|
+
"baseName": "executionPrice",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"format": ""
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "priceImpact",
|
|
72
|
+
"baseName": "priceImpact",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"format": ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "fee",
|
|
78
|
+
"baseName": "fee",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"format": ""
|
|
81
|
+
} ];
|
|
82
|
+
|
|
83
|
+
static getAttributeTypeMap() {
|
|
84
|
+
return QuoteResponse.attributeTypeMap;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public constructor() {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -78,9 +78,9 @@ export class TradeDetailDTO {
|
|
|
78
78
|
*/
|
|
79
79
|
'tokenAmountInUsd': string;
|
|
80
80
|
/**
|
|
81
|
-
* DTO.TRADE.DETAIL.
|
|
81
|
+
* DTO.TRADE.DETAIL.TYPE
|
|
82
82
|
*/
|
|
83
|
-
'
|
|
83
|
+
'type': string;
|
|
84
84
|
/**
|
|
85
85
|
* DTO.TRADE.DETAIL.SIDE_TOKEN_NAME
|
|
86
86
|
*/
|
|
@@ -216,8 +216,8 @@ export class TradeDetailDTO {
|
|
|
216
216
|
"format": ""
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
|
-
"name": "
|
|
220
|
-
"baseName": "
|
|
219
|
+
"name": "type",
|
|
220
|
+
"baseName": "type",
|
|
221
221
|
"type": "string",
|
|
222
222
|
"format": ""
|
|
223
223
|
},
|
|
@@ -4,8 +4,8 @@ export * from '../models/Candle'
|
|
|
4
4
|
export * from '../models/ClaimRedPacketInput'
|
|
5
5
|
export * from '../models/CreateRedPacketInput'
|
|
6
6
|
export * from '../models/CreateRedPacketReply'
|
|
7
|
+
export * from '../models/CreateTokenInput'
|
|
7
8
|
export * from '../models/CreateTokenReply'
|
|
8
|
-
export * from '../models/DexCreateTokenInput'
|
|
9
9
|
export * from '../models/DexDTO'
|
|
10
10
|
export * from '../models/DexPage'
|
|
11
11
|
export * from '../models/DexPoolDTO'
|
|
@@ -19,6 +19,7 @@ export * from '../models/MoonshotSubmitCreateToken200Response'
|
|
|
19
19
|
export * from '../models/MoonshotSubmitCreateTokenInput'
|
|
20
20
|
export * from '../models/PumpCreateTokenInput'
|
|
21
21
|
export * from '../models/PumpCreateTokenReply'
|
|
22
|
+
export * from '../models/QuoteResponse'
|
|
22
23
|
export * from '../models/RedPacketClaimDTO'
|
|
23
24
|
export * from '../models/RedPacketClaimsPage'
|
|
24
25
|
export * from '../models/RedPacketDTO'
|
|
@@ -7,8 +7,8 @@ import { Candle } from '../models/Candle';
|
|
|
7
7
|
import { ClaimRedPacketInput } from '../models/ClaimRedPacketInput';
|
|
8
8
|
import { CreateRedPacketInput } from '../models/CreateRedPacketInput';
|
|
9
9
|
import { CreateRedPacketReply } from '../models/CreateRedPacketReply';
|
|
10
|
+
import { CreateTokenInput } from '../models/CreateTokenInput';
|
|
10
11
|
import { CreateTokenReply } from '../models/CreateTokenReply';
|
|
11
|
-
import { DexCreateTokenInput } from '../models/DexCreateTokenInput';
|
|
12
12
|
import { DexDTO } from '../models/DexDTO';
|
|
13
13
|
import { DexPage } from '../models/DexPage';
|
|
14
14
|
import { DexPoolDTO } from '../models/DexPoolDTO';
|
|
@@ -22,6 +22,7 @@ import { MoonshotSubmitCreateToken200Response } from '../models/MoonshotSubmitCr
|
|
|
22
22
|
import { MoonshotSubmitCreateTokenInput } from '../models/MoonshotSubmitCreateTokenInput';
|
|
23
23
|
import { PumpCreateTokenInput } from '../models/PumpCreateTokenInput';
|
|
24
24
|
import { PumpCreateTokenReply } from '../models/PumpCreateTokenReply';
|
|
25
|
+
import { QuoteResponse } from '../models/QuoteResponse';
|
|
25
26
|
import { RedPacketClaimDTO } from '../models/RedPacketClaimDTO';
|
|
26
27
|
import { RedPacketClaimsPage } from '../models/RedPacketClaimsPage';
|
|
27
28
|
import { RedPacketDTO } from '../models/RedPacketDTO';
|
|
@@ -240,10 +241,10 @@ export interface DexApiCreateTokenRequest {
|
|
|
240
241
|
chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui'
|
|
241
242
|
/**
|
|
242
243
|
* Token creation parameters
|
|
243
|
-
* @type
|
|
244
|
+
* @type CreateTokenInput
|
|
244
245
|
* @memberof DexApicreateToken
|
|
245
246
|
*/
|
|
246
|
-
|
|
247
|
+
createTokenInput: CreateTokenInput
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
export interface DexApiListRequest {
|
|
@@ -272,6 +273,58 @@ export interface DexApiListRequest {
|
|
|
272
273
|
dexProgram?: string
|
|
273
274
|
}
|
|
274
275
|
|
|
276
|
+
export interface DexApiQuoteRequest {
|
|
277
|
+
/**
|
|
278
|
+
* GLOBAL.CHAIN.DESCRIPTION
|
|
279
|
+
* Defaults to: undefined
|
|
280
|
+
* @type 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui'
|
|
281
|
+
* @memberof DexApiquote
|
|
282
|
+
*/
|
|
283
|
+
chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui'
|
|
284
|
+
/**
|
|
285
|
+
* DTO.DEX.QUOTE.DEX
|
|
286
|
+
* Defaults to: undefined
|
|
287
|
+
* @type 'raydium' | 'pumpfun'
|
|
288
|
+
* @memberof DexApiquote
|
|
289
|
+
*/
|
|
290
|
+
dex: 'raydium' | 'pumpfun'
|
|
291
|
+
/**
|
|
292
|
+
* DTO.DEX.QUOTE.AMOUNT
|
|
293
|
+
* Defaults to: undefined
|
|
294
|
+
* @type string
|
|
295
|
+
* @memberof DexApiquote
|
|
296
|
+
*/
|
|
297
|
+
amount: string
|
|
298
|
+
/**
|
|
299
|
+
* DTO.DEX.QUOTE.INPUT_MINT
|
|
300
|
+
* Defaults to: undefined
|
|
301
|
+
* @type string
|
|
302
|
+
* @memberof DexApiquote
|
|
303
|
+
*/
|
|
304
|
+
inputMint: string
|
|
305
|
+
/**
|
|
306
|
+
* DTO.DEX.QUOTE.OUTPUT_MINT
|
|
307
|
+
* Defaults to: undefined
|
|
308
|
+
* @type string
|
|
309
|
+
* @memberof DexApiquote
|
|
310
|
+
*/
|
|
311
|
+
outputMint: string
|
|
312
|
+
/**
|
|
313
|
+
* DTO.DEX.QUOTE.EXACT_IN
|
|
314
|
+
* Defaults to: true
|
|
315
|
+
* @type boolean
|
|
316
|
+
* @memberof DexApiquote
|
|
317
|
+
*/
|
|
318
|
+
exactIn: boolean
|
|
319
|
+
/**
|
|
320
|
+
* DTO.DEX.QUOTE.SLIPPAGE
|
|
321
|
+
* Defaults to: undefined
|
|
322
|
+
* @type number
|
|
323
|
+
* @memberof DexApiquote
|
|
324
|
+
*/
|
|
325
|
+
slippage: number
|
|
326
|
+
}
|
|
327
|
+
|
|
275
328
|
export interface DexApiRouteRequest {
|
|
276
329
|
/**
|
|
277
330
|
* GLOBAL.CHAIN.DESCRIPTION
|
|
@@ -317,7 +370,7 @@ export class ObjectDexApi {
|
|
|
317
370
|
* @param param the request object
|
|
318
371
|
*/
|
|
319
372
|
public createTokenWithHttpInfo(param: DexApiCreateTokenRequest, options?: Configuration): Promise<HttpInfo<CreateTokenReply>> {
|
|
320
|
-
return this.api.createTokenWithHttpInfo(param.chain, param.
|
|
373
|
+
return this.api.createTokenWithHttpInfo(param.chain, param.createTokenInput, options).toPromise();
|
|
321
374
|
}
|
|
322
375
|
|
|
323
376
|
/**
|
|
@@ -326,7 +379,7 @@ export class ObjectDexApi {
|
|
|
326
379
|
* @param param the request object
|
|
327
380
|
*/
|
|
328
381
|
public createToken(param: DexApiCreateTokenRequest, options?: Configuration): Promise<CreateTokenReply> {
|
|
329
|
-
return this.api.createToken(param.chain, param.
|
|
382
|
+
return this.api.createToken(param.chain, param.createTokenInput, options).toPromise();
|
|
330
383
|
}
|
|
331
384
|
|
|
332
385
|
/**
|
|
@@ -347,6 +400,24 @@ export class ObjectDexApi {
|
|
|
347
400
|
return this.api.list(param.chains, param.limit, param.dexProgram, options).toPromise();
|
|
348
401
|
}
|
|
349
402
|
|
|
403
|
+
/**
|
|
404
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
405
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
406
|
+
* @param param the request object
|
|
407
|
+
*/
|
|
408
|
+
public quoteWithHttpInfo(param: DexApiQuoteRequest, options?: Configuration): Promise<HttpInfo<QuoteResponse>> {
|
|
409
|
+
return this.api.quoteWithHttpInfo(param.chain, param.dex, param.amount, param.inputMint, param.outputMint, param.exactIn, param.slippage, options).toPromise();
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* CONTROLLER.DEX.QUOTE.DESCRIPTION
|
|
414
|
+
* CONTROLLER.DEX.QUOTE.SUMMARY
|
|
415
|
+
* @param param the request object
|
|
416
|
+
*/
|
|
417
|
+
public quote(param: DexApiQuoteRequest, options?: Configuration): Promise<QuoteResponse> {
|
|
418
|
+
return this.api.quote(param.chain, param.dex, param.amount, param.inputMint, param.outputMint, param.exactIn, param.slippage, options).toPromise();
|
|
419
|
+
}
|
|
420
|
+
|
|
350
421
|
/**
|
|
351
422
|
* CONTROLLER.DEX.ROUTE.DESCRIPTION
|
|
352
423
|
* CONTROLLER.DEX.ROUTE.SUMMARY
|
|
@@ -3128,6 +3199,95 @@ export class ObjectTokenApi {
|
|
|
3128
3199
|
import { ObservableTradeApi } from "./ObservableAPI";
|
|
3129
3200
|
import { TradeApiRequestFactory, TradeApiResponseProcessor} from "../apis/TradeApi";
|
|
3130
3201
|
|
|
3202
|
+
export interface TradeApiGetActivitiesRequest {
|
|
3203
|
+
/**
|
|
3204
|
+
* GLOBAL.CHAIN.DESCRIPTION
|
|
3205
|
+
* Defaults to: undefined
|
|
3206
|
+
* @type 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui'
|
|
3207
|
+
* @memberof TradeApigetActivities
|
|
3208
|
+
*/
|
|
3209
|
+
chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui'
|
|
3210
|
+
/**
|
|
3211
|
+
* DTO.PAGE.CURSOR.DESCRIPTION
|
|
3212
|
+
* Defaults to: undefined
|
|
3213
|
+
* @type string
|
|
3214
|
+
* @memberof TradeApigetActivities
|
|
3215
|
+
*/
|
|
3216
|
+
cursor?: string
|
|
3217
|
+
/**
|
|
3218
|
+
* DTO.PAGE.LIMIT
|
|
3219
|
+
* Minimum: 1
|
|
3220
|
+
* Maximum: 100
|
|
3221
|
+
* Defaults to: 20
|
|
3222
|
+
* @type number
|
|
3223
|
+
* @memberof TradeApigetActivities
|
|
3224
|
+
*/
|
|
3225
|
+
limit?: number
|
|
3226
|
+
/**
|
|
3227
|
+
* DTO.PAGE.DIRECTION
|
|
3228
|
+
* Defaults to: 'next'
|
|
3229
|
+
* @type 'next' | 'prev'
|
|
3230
|
+
* @memberof TradeApigetActivities
|
|
3231
|
+
*/
|
|
3232
|
+
direction?: 'next' | 'prev'
|
|
3233
|
+
/**
|
|
3234
|
+
* DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
3235
|
+
* Defaults to: undefined
|
|
3236
|
+
* @type string
|
|
3237
|
+
* @memberof TradeApigetActivities
|
|
3238
|
+
*/
|
|
3239
|
+
tokenAddress?: string
|
|
3240
|
+
/**
|
|
3241
|
+
* DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
3242
|
+
* Defaults to: undefined
|
|
3243
|
+
* @type string
|
|
3244
|
+
* @memberof TradeApigetActivities
|
|
3245
|
+
*/
|
|
3246
|
+
walletAddress?: string
|
|
3247
|
+
/**
|
|
3248
|
+
* DTO.TRADE.QUERY.POOL_ADDRESS
|
|
3249
|
+
* Defaults to: undefined
|
|
3250
|
+
* @type string
|
|
3251
|
+
* @memberof TradeApigetActivities
|
|
3252
|
+
*/
|
|
3253
|
+
poolAddress?: string
|
|
3254
|
+
/**
|
|
3255
|
+
* DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
3256
|
+
* Defaults to: undefined
|
|
3257
|
+
* @type number
|
|
3258
|
+
* @memberof TradeApigetActivities
|
|
3259
|
+
*/
|
|
3260
|
+
beforeTimestamp?: number
|
|
3261
|
+
/**
|
|
3262
|
+
* DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
3263
|
+
* Defaults to: undefined
|
|
3264
|
+
* @type number
|
|
3265
|
+
* @memberof TradeApigetActivities
|
|
3266
|
+
*/
|
|
3267
|
+
afterTimestamp?: number
|
|
3268
|
+
/**
|
|
3269
|
+
* DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
3270
|
+
* Defaults to: undefined
|
|
3271
|
+
* @type number
|
|
3272
|
+
* @memberof TradeApigetActivities
|
|
3273
|
+
*/
|
|
3274
|
+
beforeBlockHeight?: number
|
|
3275
|
+
/**
|
|
3276
|
+
* DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
3277
|
+
* Defaults to: undefined
|
|
3278
|
+
* @type number
|
|
3279
|
+
* @memberof TradeApigetActivities
|
|
3280
|
+
*/
|
|
3281
|
+
afterBlockHeight?: number
|
|
3282
|
+
/**
|
|
3283
|
+
* DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
3284
|
+
* Defaults to: undefined
|
|
3285
|
+
* @type 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND'
|
|
3286
|
+
* @memberof TradeApigetActivities
|
|
3287
|
+
*/
|
|
3288
|
+
type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND'
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3131
3291
|
export interface TradeApiGetGainersLosersRequest {
|
|
3132
3292
|
/**
|
|
3133
3293
|
* GLOBAL.CHAIN.DESCRIPTION
|
|
@@ -3323,6 +3483,13 @@ export interface TradeApiGetTradesRequest {
|
|
|
3323
3483
|
* @memberof TradeApigetTrades
|
|
3324
3484
|
*/
|
|
3325
3485
|
afterBlockHeight?: number
|
|
3486
|
+
/**
|
|
3487
|
+
* DTO.TRADE.QUERY.TRADES_TYPE
|
|
3488
|
+
* Defaults to: undefined
|
|
3489
|
+
* @type 'BUY' | 'SELL'
|
|
3490
|
+
* @memberof TradeApigetTrades
|
|
3491
|
+
*/
|
|
3492
|
+
type?: 'BUY' | 'SELL'
|
|
3326
3493
|
}
|
|
3327
3494
|
|
|
3328
3495
|
export class ObjectTradeApi {
|
|
@@ -3332,6 +3499,24 @@ export class ObjectTradeApi {
|
|
|
3332
3499
|
this.api = new ObservableTradeApi(configuration, requestFactory, responseProcessor);
|
|
3333
3500
|
}
|
|
3334
3501
|
|
|
3502
|
+
/**
|
|
3503
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
3504
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
3505
|
+
* @param param the request object
|
|
3506
|
+
*/
|
|
3507
|
+
public getActivitiesWithHttpInfo(param: TradeApiGetActivitiesRequest, options?: Configuration): Promise<HttpInfo<TradePage>> {
|
|
3508
|
+
return this.api.getActivitiesWithHttpInfo(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, param.type, options).toPromise();
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
/**
|
|
3512
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
3513
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
3514
|
+
* @param param the request object
|
|
3515
|
+
*/
|
|
3516
|
+
public getActivities(param: TradeApiGetActivitiesRequest, options?: Configuration): Promise<TradePage> {
|
|
3517
|
+
return this.api.getActivities(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, param.type, options).toPromise();
|
|
3518
|
+
}
|
|
3519
|
+
|
|
3335
3520
|
/**
|
|
3336
3521
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
3337
3522
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
@@ -3374,7 +3559,7 @@ export class ObjectTradeApi {
|
|
|
3374
3559
|
* @param param the request object
|
|
3375
3560
|
*/
|
|
3376
3561
|
public getTradesWithHttpInfo(param: TradeApiGetTradesRequest, options?: Configuration): Promise<HttpInfo<TradePage>> {
|
|
3377
|
-
return this.api.getTradesWithHttpInfo(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, options).toPromise();
|
|
3562
|
+
return this.api.getTradesWithHttpInfo(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, param.type, options).toPromise();
|
|
3378
3563
|
}
|
|
3379
3564
|
|
|
3380
3565
|
/**
|
|
@@ -3383,7 +3568,7 @@ export class ObjectTradeApi {
|
|
|
3383
3568
|
* @param param the request object
|
|
3384
3569
|
*/
|
|
3385
3570
|
public getTrades(param: TradeApiGetTradesRequest, options?: Configuration): Promise<TradePage> {
|
|
3386
|
-
return this.api.getTrades(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, options).toPromise();
|
|
3571
|
+
return this.api.getTrades(param.chain, param.cursor, param.limit, param.direction, param.tokenAddress, param.walletAddress, param.poolAddress, param.beforeTimestamp, param.afterTimestamp, param.beforeBlockHeight, param.afterBlockHeight, param.type, options).toPromise();
|
|
3387
3572
|
}
|
|
3388
3573
|
|
|
3389
3574
|
}
|