Bancor SDK › Globals › Pricing
The Pricing module provides access to pricing and rates logic for tokens in the bancor network
SDKModule
↳ Pricing
core
+ new Pricing(core
: Core): Pricing
Inherited from History.constructor
Parameters:
Name | Type |
| Core |
Returns: Pricing
• core: any = null
▸ getPathAndRate(sourceToken
: Token, targetToken
: Token, amount
: string): Promise‹object›
returns the best conversion path and rate for a given pair of tokens in the bancor network
Parameters:
Returns: Promise‹object›
the best path and rate between the source token and the target token
▸ getRateByPath(path
: Token[], amount
: string): Promise‹string›
returns the rate for a given conversion path in the bancor network
Parameters:
Name | Type | Default | Description |
| Token[] | - | conversion path |
| string | "1" | input amount |
Returns: Promise‹string›
output amount for a conversion on the given path