Skip to content

Commit

Permalink
add /prices query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Jul 5, 2024
1 parent c4f7abf commit bf2cc54
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/methods/swap/rates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export enum PricingMethod {
simplepath = 'simplepath',
}

// more details in the docs https://developers.paraswap.network/api/get-rate-for-a-token-pair#query-parameters
export type RateOptions = {
excludeDEXS?: string[];
includeDEXS?: string[];
Expand All @@ -33,10 +34,20 @@ export type RateOptions = {
maxImpact?: number;
maxUSDImpact?: number;
otherExchangePrices?: boolean;
srcTokenTransferFee?: number;
destTokenTransferFee?: number;
srcTokenDexTransferFee?: number;
destTokenDexTransferFee?: number;
/** @description proceed with priceRoute building even when tokens don't have USD price. Default: false */
ignoreBadUsdPrice?: boolean;
/** @description Specify that methods without fee support should be excluded from the price route. Default: false */
exlcudeContractMethodsWithoutFeeModel?: boolean;
/** @description Dash (-) separated list of tokens (addresses or symbols from /tokens) to comprise the price route. Max 4 tokens. */
route?: string;
/** @description If the source token is a tax token, you should specify the tax amount in BPS. */
srcTokenTransferFee?: string;
/** @description If the destination token is a tax token, you should specify the tax amount in BPS. */
destTokenTransferFee?: string;
/** @description Some tokens only charge tax when swapped in/out DEXs and not on ordinary transfers. */
srcTokenDexTransferFee?: string;
/** @description Some tokens only charge tax when swapped in/out DEXs and not on ordinary transfers. */
destTokenDexTransferFee?: string;
};

type CommonGetRateInput = {
Expand Down

0 comments on commit bf2cc54

Please sign in to comment.