diff --git a/generated/apis/SwapApi.ts b/generated/apis/SwapApi.ts index 8f35d1a..1daa1f2 100644 --- a/generated/apis/SwapApi.ts +++ b/generated/apis/SwapApi.ts @@ -34,7 +34,7 @@ import { export interface QuoteGetRequest { inputMint: string; outputMint: string; - amount: number; + amount: string; slippageBps?: number; swapMode?: QuoteGetSwapModeEnum; dexes?: Array; diff --git a/swagger.yaml b/swagger.yaml index 80c7c58..5e403fc 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -528,11 +528,15 @@ components: - Raw amount to swap (before decimals) - Input Amount if `SwapMode=ExactIn` - Output Amount if `SwapMode=ExactOut` + - This is a u64 in atomic units. It is typed as `string` to preserve full + precision: a JS `number` is an IEEE-754 double and silently loses + precision above 2^53-1, while a u64 can be up to ~1.84e19. Response-side + amounts (`inAmount`, `outAmount`, ...) are already strings for the same + reason. in: query required: true schema: - type: integer - format: uint64 + type: string SlippageParameter: name: slippageBps description: |