Pricing
Bancor SDK › Globals › Pricing
Class: Pricing
The Pricing module provides access to pricing and rates logic for tokens in the bancor network
Hierarchy
SDKModule
↳ Pricing
Index
Constructors
Properties
Methods
Constructors
constructor
+ new Pricing(core
: Core): Pricing
Inherited from History.constructor
Parameters:
Name | Type |
| Core |
Returns: Pricing
Properties
core
• core: any = null
Methods
getPathAndRate
▸ 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:
Name | Type | Default | Description |
| - | source token | |
| - | target token | |
| string | "1" | input amount |
Returns: Promise‹object›
the best path and rate between the source token and the target token
getRateByPath
▸ 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
Last updated