@chainstream-io/sdk 0.0.9 → 0.0.12
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.d.ts +5 -1
- package/dist/api/stream.js +31 -6
- package/dist/api/stream.js.map +1 -1
- package/dist/api/stream.model.d.ts +3 -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/DexDTO.d.ts +3 -3
- package/dist/openapi/models/DexPoolDTO.d.ts +3 -3
- 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/TokenMarketData.d.ts +3 -3
- package/dist/openapi/models/TokenMarketData.js +6 -6
- package/dist/openapi/models/TokenMarketData.js.map +1 -1
- 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 +3 -0
- package/src/api/stream.ts +39 -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/DexDTO.ts +3 -3
- package/src/openapi/models/DexPoolDTO.ts +3 -3
- package/src/openapi/models/ObjectSerializer.ts +7 -4
- package/src/openapi/models/QuoteResponse.ts +89 -0
- package/src/openapi/models/TokenMarketData.ts +12 -12
- 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
|
@@ -17,6 +17,124 @@ import { TradePage } from '../models/TradePage';
|
|
|
17
17
|
*/
|
|
18
18
|
export class TradeApiRequestFactory extends BaseAPIRequestFactory {
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.DESCRIPTION
|
|
22
|
+
* CONTROLLER.TRADE.GET.TOKEN_ACTIVITIES.SUMMARY
|
|
23
|
+
* @param chain GLOBAL.CHAIN.DESCRIPTION
|
|
24
|
+
* @param cursor DTO.PAGE.CURSOR.DESCRIPTION
|
|
25
|
+
* @param limit DTO.PAGE.LIMIT
|
|
26
|
+
* @param direction DTO.PAGE.DIRECTION
|
|
27
|
+
* @param tokenAddress DTO.TRADE.QUERY.TOKEN_ADDRESS
|
|
28
|
+
* @param walletAddress DTO.TRADE.QUERY.WALLET_ADDRESS
|
|
29
|
+
* @param poolAddress DTO.TRADE.QUERY.POOL_ADDRESS
|
|
30
|
+
* @param beforeTimestamp DTO.TRADE.QUERY.BEFORE_TIMESTAMP
|
|
31
|
+
* @param afterTimestamp DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
32
|
+
* @param beforeBlockHeight DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
33
|
+
* @param afterBlockHeight DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
34
|
+
* @param type DTO.TRADE.QUERY.ACTIVITIES_TYPE
|
|
35
|
+
*/
|
|
36
|
+
public async getActivities(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND', _options?: Configuration): Promise<RequestContext> {
|
|
37
|
+
let _config = _options || this.configuration;
|
|
38
|
+
|
|
39
|
+
// verify required parameter 'chain' is not null or undefined
|
|
40
|
+
if (chain === null || chain === undefined) {
|
|
41
|
+
throw new RequiredError("TradeApi", "getActivities", "chain");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// Path Params
|
|
57
|
+
const localVarPath = '/v1/trade/{chain}/activities'
|
|
58
|
+
.replace('{' + 'chain' + '}', encodeURIComponent(String(chain)));
|
|
59
|
+
|
|
60
|
+
// Make Request Context
|
|
61
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
62
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
63
|
+
const randomId = Math.floor(Math.random() * Math.pow(2, 32))
|
|
64
|
+
requestContext.setHeaderParam("x-req-id", randomId.toString())
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
// Query Params
|
|
68
|
+
if (cursor !== undefined) {
|
|
69
|
+
requestContext.setQueryParam("cursor", ObjectSerializer.serialize(cursor, "string", ""));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Query Params
|
|
73
|
+
if (limit !== undefined) {
|
|
74
|
+
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Query Params
|
|
78
|
+
if (direction !== undefined) {
|
|
79
|
+
requestContext.setQueryParam("direction", ObjectSerializer.serialize(direction, "'next' | 'prev'", ""));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Query Params
|
|
83
|
+
if (tokenAddress !== undefined) {
|
|
84
|
+
requestContext.setQueryParam("tokenAddress", ObjectSerializer.serialize(tokenAddress, "string", ""));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Query Params
|
|
88
|
+
if (walletAddress !== undefined) {
|
|
89
|
+
requestContext.setQueryParam("walletAddress", ObjectSerializer.serialize(walletAddress, "string", ""));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Query Params
|
|
93
|
+
if (poolAddress !== undefined) {
|
|
94
|
+
requestContext.setQueryParam("poolAddress", ObjectSerializer.serialize(poolAddress, "string", ""));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Query Params
|
|
98
|
+
if (beforeTimestamp !== undefined) {
|
|
99
|
+
requestContext.setQueryParam("beforeTimestamp", ObjectSerializer.serialize(beforeTimestamp, "number", ""));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Query Params
|
|
103
|
+
if (afterTimestamp !== undefined) {
|
|
104
|
+
requestContext.setQueryParam("afterTimestamp", ObjectSerializer.serialize(afterTimestamp, "number", ""));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Query Params
|
|
108
|
+
if (beforeBlockHeight !== undefined) {
|
|
109
|
+
requestContext.setQueryParam("beforeBlockHeight", ObjectSerializer.serialize(beforeBlockHeight, "number", ""));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Query Params
|
|
113
|
+
if (afterBlockHeight !== undefined) {
|
|
114
|
+
requestContext.setQueryParam("afterBlockHeight", ObjectSerializer.serialize(afterBlockHeight, "number", ""));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Query Params
|
|
118
|
+
if (type !== undefined) {
|
|
119
|
+
requestContext.setQueryParam("type", ObjectSerializer.serialize(type, "'BUY' | 'SELL' | 'LIQUIDITY_INITIALIZE' | 'LIQUIDITY_ADD' | 'LIQUIDITY_REMOVE' | 'RED_PACKET_CREATE' | 'RED_PACKET_CLAIM' | 'RED_PACKET_COMPLETE' | 'RED_PACKET_REFUND'", ""));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
124
|
+
// Apply auth methods
|
|
125
|
+
authMethod = _config.authMethods["bearer"]
|
|
126
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
127
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
131
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
132
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return requestContext;
|
|
136
|
+
}
|
|
137
|
+
|
|
20
138
|
/**
|
|
21
139
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.DESCRIPTION
|
|
22
140
|
* CONTROLLER.TRADE.GET.GAINERS_LOSERS.SUMMARY
|
|
@@ -239,8 +357,9 @@ export class TradeApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
239
357
|
* @param afterTimestamp DTO.TRADE.QUERY.AFTER_TIMESTAMP
|
|
240
358
|
* @param beforeBlockHeight DTO.TRADE.QUERY.BEFORE_BLOCK_HEIGHT
|
|
241
359
|
* @param afterBlockHeight DTO.TRADE.QUERY.AFTER_BLOCK_HEIGHT
|
|
360
|
+
* @param type DTO.TRADE.QUERY.TRADES_TYPE
|
|
242
361
|
*/
|
|
243
|
-
public async getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, _options?: Configuration): Promise<RequestContext> {
|
|
362
|
+
public async getTrades(chain: 'sol' | 'base' | 'bsc' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'ethereum' | 'zksync' | 'sui', cursor?: string, limit?: number, direction?: 'next' | 'prev', tokenAddress?: string, walletAddress?: string, poolAddress?: string, beforeTimestamp?: number, afterTimestamp?: number, beforeBlockHeight?: number, afterBlockHeight?: number, type?: 'BUY' | 'SELL', _options?: Configuration): Promise<RequestContext> {
|
|
244
363
|
let _config = _options || this.configuration;
|
|
245
364
|
|
|
246
365
|
// verify required parameter 'chain' is not null or undefined
|
|
@@ -259,6 +378,7 @@ export class TradeApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
259
378
|
|
|
260
379
|
|
|
261
380
|
|
|
381
|
+
|
|
262
382
|
// Path Params
|
|
263
383
|
const localVarPath = '/v1/trade/{chain}'
|
|
264
384
|
.replace('{' + 'chain' + '}', encodeURIComponent(String(chain)));
|
|
@@ -320,6 +440,11 @@ export class TradeApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
320
440
|
requestContext.setQueryParam("afterBlockHeight", ObjectSerializer.serialize(afterBlockHeight, "number", ""));
|
|
321
441
|
}
|
|
322
442
|
|
|
443
|
+
// Query Params
|
|
444
|
+
if (type !== undefined) {
|
|
445
|
+
requestContext.setQueryParam("type", ObjectSerializer.serialize(type, "'BUY' | 'SELL'", ""));
|
|
446
|
+
}
|
|
447
|
+
|
|
323
448
|
|
|
324
449
|
let authMethod: SecurityAuthentication | undefined;
|
|
325
450
|
// Apply auth methods
|
|
@@ -340,6 +465,34 @@ export class TradeApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
340
465
|
|
|
341
466
|
export class TradeApiResponseProcessor {
|
|
342
467
|
|
|
468
|
+
/**
|
|
469
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
470
|
+
* to the expected objects
|
|
471
|
+
*
|
|
472
|
+
* @params response Response returned by the server for a request to getActivities
|
|
473
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
474
|
+
*/
|
|
475
|
+
public async getActivitiesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<TradePage >> {
|
|
476
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
477
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
478
|
+
const body: TradePage = ObjectSerializer.deserialize(
|
|
479
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
480
|
+
"TradePage", ""
|
|
481
|
+
) as TradePage;
|
|
482
|
+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
486
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
487
|
+
const body: TradePage = ObjectSerializer.deserialize(
|
|
488
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
489
|
+
"TradePage", ""
|
|
490
|
+
) as TradePage;
|
|
491
|
+
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
|
|
492
|
+
}
|
|
493
|
+
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
494
|
+
}
|
|
495
|
+
|
|
343
496
|
/**
|
|
344
497
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
345
498
|
* to the expected objects
|
package/src/openapi/index.ts
CHANGED
|
@@ -8,5 +8,5 @@ export * from "./servers";
|
|
|
8
8
|
export { RequiredError } from "./apis/baseapi";
|
|
9
9
|
|
|
10
10
|
export type { PromiseMiddleware as Middleware } from './middleware';
|
|
11
|
-
export { type BlockchainApiGetLatestBlockRequest, type BlockchainApiGetSupportedBlockchainsRequest, ObjectBlockchainApi as BlockchainApi, type DefiSolanaMoonshotApiMoonshotCreateTokenRequest, type DefiSolanaMoonshotApiMoonshotSubmitCreateTokenRequest, ObjectDefiSolanaMoonshotApi as DefiSolanaMoonshotApi, type DefiSolanaPumpfunApiPumpfunCreateTokenRequest, ObjectDefiSolanaPumpfunApi as DefiSolanaPumpfunApi, type DexApiCreateTokenRequest, type DexApiListRequest, type DexApiRouteRequest, type DexApiSwapRequest, ObjectDexApi as DexApi, type DexPoolApiGetDexpoolRequest, ObjectDexPoolApi as DexPoolApi, type IpfsApiPresignRequest, ObjectIpfsApi as IpfsApi, type JobsApiJobControllerGetJobRequest, type JobsApiJobControllerStreamingRequest, ObjectJobsApi as JobsApi, type RankingApiGetFinalStretchTokensRequest, type RankingApiGetHotTokensRequest, type RankingApiGetMigratedTokensRequest, type RankingApiGetNewTokensRequest, type RankingApiGetStocksTokensRequest, ObjectRankingApi as RankingApi, type RedPacketApiClaimRequest, type RedPacketApiCreateRequest, type RedPacketApiGetRequest, type RedPacketApiGetClaimsRequest, type RedPacketApiGetClaimsByAddressRequest, type RedPacketApiGetRedpacketsRequest, type RedPacketApiGetRedpacketsByAddressRequest, type RedPacketApiRedpacketSendRequest, ObjectRedPacketApi as RedPacketApi, type TokenApiGetCandlesRequest, type TokenApiGetCreationRequest, type TokenApiGetHoldersRequest, type TokenApiGetHoldersMultiRequest, type TokenApiGetMarketDataRequest, type TokenApiGetMarketDataMultiRequest, type TokenApiGetMetadataRequest, type TokenApiGetMetadataMultiRequest, type TokenApiGetMintAndBurnRequest, type TokenApiGetPoolsRequest, type TokenApiGetPriceByTimeRequest, type TokenApiGetPricesRequest, type TokenApiGetSecurityRequest, type TokenApiGetStatsRequest, type TokenApiGetStatsMultiRequest, type TokenApiGetTokenRequest, type TokenApiGetTokenListRequest, type TokenApiGetTokensRequest, type TokenApiGetTopHoldersRequest, type TokenApiSearchRequest, ObjectTokenApi as TokenApi, type TradeApiGetGainersLosersRequest, type TradeApiGetTopTradersRequest, type TradeApiGetTradesRequest, ObjectTradeApi as TradeApi, type TransactionApiSendRequest, ObjectTransactionApi as TransactionApi, type WalletApiCalculatePnlRequest, type WalletApiGetBalanceRequest, type WalletApiGetPnlRequest, type WalletApiGetPnlStatsRequest, ObjectWalletApi as WalletApi, type WatchlistApiWatchlistAddRequest, ObjectWatchlistApi as WatchlistApi } from './types/ObjectParamAPI';
|
|
11
|
+
export { type BlockchainApiGetLatestBlockRequest, type BlockchainApiGetSupportedBlockchainsRequest, ObjectBlockchainApi as BlockchainApi, type DefiSolanaMoonshotApiMoonshotCreateTokenRequest, type DefiSolanaMoonshotApiMoonshotSubmitCreateTokenRequest, ObjectDefiSolanaMoonshotApi as DefiSolanaMoonshotApi, type DefiSolanaPumpfunApiPumpfunCreateTokenRequest, ObjectDefiSolanaPumpfunApi as DefiSolanaPumpfunApi, type DexApiCreateTokenRequest, type DexApiListRequest, type DexApiQuoteRequest, type DexApiRouteRequest, type DexApiSwapRequest, ObjectDexApi as DexApi, type DexPoolApiGetDexpoolRequest, ObjectDexPoolApi as DexPoolApi, type IpfsApiPresignRequest, ObjectIpfsApi as IpfsApi, type JobsApiJobControllerGetJobRequest, type JobsApiJobControllerStreamingRequest, ObjectJobsApi as JobsApi, type RankingApiGetFinalStretchTokensRequest, type RankingApiGetHotTokensRequest, type RankingApiGetMigratedTokensRequest, type RankingApiGetNewTokensRequest, type RankingApiGetStocksTokensRequest, ObjectRankingApi as RankingApi, type RedPacketApiClaimRequest, type RedPacketApiCreateRequest, type RedPacketApiGetRequest, type RedPacketApiGetClaimsRequest, type RedPacketApiGetClaimsByAddressRequest, type RedPacketApiGetRedpacketsRequest, type RedPacketApiGetRedpacketsByAddressRequest, type RedPacketApiRedpacketSendRequest, ObjectRedPacketApi as RedPacketApi, type TokenApiGetCandlesRequest, type TokenApiGetCreationRequest, type TokenApiGetHoldersRequest, type TokenApiGetHoldersMultiRequest, type TokenApiGetMarketDataRequest, type TokenApiGetMarketDataMultiRequest, type TokenApiGetMetadataRequest, type TokenApiGetMetadataMultiRequest, type TokenApiGetMintAndBurnRequest, type TokenApiGetPoolsRequest, type TokenApiGetPriceByTimeRequest, type TokenApiGetPricesRequest, type TokenApiGetSecurityRequest, type TokenApiGetStatsRequest, type TokenApiGetStatsMultiRequest, type TokenApiGetTokenRequest, type TokenApiGetTokenListRequest, type TokenApiGetTokensRequest, type TokenApiGetTopHoldersRequest, type TokenApiSearchRequest, ObjectTokenApi as TokenApi, type TradeApiGetActivitiesRequest, type TradeApiGetGainersLosersRequest, type TradeApiGetTopTradersRequest, type TradeApiGetTradesRequest, ObjectTradeApi as TradeApi, type TransactionApiSendRequest, ObjectTransactionApi as TransactionApi, type WalletApiCalculatePnlRequest, type WalletApiGetBalanceRequest, type WalletApiGetPnlRequest, type WalletApiGetPnlStatsRequest, ObjectWalletApi as WalletApi, type WatchlistApiWatchlistAddRequest, ObjectWatchlistApi as WatchlistApi } from './types/ObjectParamAPI';
|
|
12
12
|
|
|
@@ -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',
|
|
@@ -16,15 +16,15 @@ export class DexDTO {
|
|
|
16
16
|
/**
|
|
17
17
|
* DTO.DEX.PROGRAM_ADDRESS
|
|
18
18
|
*/
|
|
19
|
-
'programAddress'
|
|
19
|
+
'programAddress'?: string;
|
|
20
20
|
/**
|
|
21
21
|
* DTO.DEX.PROTOCOL_FAMILY
|
|
22
22
|
*/
|
|
23
|
-
'protocolFamily'
|
|
23
|
+
'protocolFamily'?: string;
|
|
24
24
|
/**
|
|
25
25
|
* DTO.DEX.IMAGE
|
|
26
26
|
*/
|
|
27
|
-
'image'
|
|
27
|
+
'image'?: string;
|
|
28
28
|
/**
|
|
29
29
|
* DTO.DEX.CHAIN
|
|
30
30
|
*/
|
|
@@ -16,15 +16,15 @@ export class DexPoolDTO {
|
|
|
16
16
|
/**
|
|
17
17
|
* DTO.DEX.PROGRAM_ADDRESS
|
|
18
18
|
*/
|
|
19
|
-
'programAddress'
|
|
19
|
+
'programAddress'?: string;
|
|
20
20
|
/**
|
|
21
21
|
* DTO.DEX.PROTOCOL_FAMILY
|
|
22
22
|
*/
|
|
23
|
-
'protocolFamily'
|
|
23
|
+
'protocolFamily'?: string;
|
|
24
24
|
/**
|
|
25
25
|
* DTO.DEX.IMAGE
|
|
26
26
|
*/
|
|
27
|
-
'image'
|
|
27
|
+
'image'?: string;
|
|
28
28
|
/**
|
|
29
29
|
* DTO.DEX.CHAIN
|
|
30
30
|
*/
|
|
@@ -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
|
+
}
|
|
@@ -66,17 +66,17 @@ export class TokenMarketData {
|
|
|
66
66
|
*/
|
|
67
67
|
'completionRatio'?: string;
|
|
68
68
|
/**
|
|
69
|
-
* DTO.TOKEN.MARKET_CAP.
|
|
69
|
+
* DTO.TOKEN.MARKET_CAP.DEV_COUNT
|
|
70
70
|
*/
|
|
71
|
-
'
|
|
71
|
+
'devTeamCount'?: number;
|
|
72
72
|
/**
|
|
73
|
-
* DTO.TOKEN.MARKET_CAP.
|
|
73
|
+
* DTO.TOKEN.MARKET_CAP.DEV_AMOUNT
|
|
74
74
|
*/
|
|
75
|
-
'
|
|
75
|
+
'devTeamAmount'?: string;
|
|
76
76
|
/**
|
|
77
|
-
* DTO.TOKEN.MARKET_CAP.
|
|
77
|
+
* DTO.TOKEN.MARKET_CAP.DEV_RATIO
|
|
78
78
|
*/
|
|
79
|
-
'
|
|
79
|
+
'devTeamRatio'?: string;
|
|
80
80
|
|
|
81
81
|
static readonly discriminator: string | undefined = undefined;
|
|
82
82
|
|
|
@@ -162,20 +162,20 @@ export class TokenMarketData {
|
|
|
162
162
|
"format": ""
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
|
-
"name": "
|
|
166
|
-
"baseName": "
|
|
165
|
+
"name": "devTeamCount",
|
|
166
|
+
"baseName": "devTeamCount",
|
|
167
167
|
"type": "number",
|
|
168
168
|
"format": ""
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
"name": "
|
|
172
|
-
"baseName": "
|
|
171
|
+
"name": "devTeamAmount",
|
|
172
|
+
"baseName": "devTeamAmount",
|
|
173
173
|
"type": "string",
|
|
174
174
|
"format": ""
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
"name": "
|
|
178
|
-
"baseName": "
|
|
177
|
+
"name": "devTeamRatio",
|
|
178
|
+
"baseName": "devTeamRatio",
|
|
179
179
|
"type": "string",
|
|
180
180
|
"format": ""
|
|
181
181
|
} ];
|
|
@@ -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'
|