Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-nodes / FormattedSwapResponse

Class: FormattedSwapResponse ​

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/types.ts:1210

FormattedSwapResponse provides a user-friendly representation of a swap quote

Constructors ​

Constructor ​

new FormattedSwapResponse(): FormattedSwapResponse

Returns ​

FormattedSwapResponse

Properties ​

quote ​

quote: object

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/types.ts:1262

dexRoutes ​

dexRoutes: object[]

fromToken ​

fromToken: object

fromToken.amount ​

amount: string

fromToken.decimal ​

decimal: string

fromToken.symbol ​

symbol: string

fromToken.unitPrice ​

unitPrice: string

priceImpact ​

priceImpact: string

toToken ​

toToken: object

toToken.amount ​

amount: string

toToken.decimal ​

decimal: string

toToken.symbol ​

symbol: string

toToken.unitPrice ​

unitPrice: string


success ​

success: boolean = false

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/types.ts:1215


summary ​

summary: string = ''

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/types.ts:1302


tx? ​

optional tx: object

Defined in: packages/chaingraph-nodes/src/nodes/okx-dex-api/types.ts:1314

data ​

data: string

Licensed under BUSL-1.1