Skip to main content

Class: TradingSdk

Constructors

constructor

new TradingSdk(traderParams?, options?): TradingSdk

Parameters

NameType
traderParamsPartial<TraderParameters>
optionsPartial<TradingSdkOptions>

Returns

TradingSdk

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:28

Properties

options

Readonly options: Partial<TradingSdkOptions> = {}

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:30


traderParams

traderParams: Partial<TraderParameters> = {}

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:29

Methods

getPreSignTransaction

getPreSignTransaction(params): Promise<TransactionParams>

Parameters

NameType
paramsWithPartialTraderParams<{ account: string ; orderId: string }>

Returns

Promise<TransactionParams>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:110


getQuote

getQuote(params, advancedSettings?): Promise<QuoteAndPost>

Parameters

NameType
paramsWithPartialTraderParams<TradeParameters>
advancedSettings?SwapAdvancedSettings

Returns

Promise<QuoteAndPost>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:43


getQuoteResults

getQuoteResults(params, advancedSettings?): Promise<QuoteResultsWithSigner>

Parameters

NameType
paramsWithPartialTraderParams<TradeParameters>
advancedSettings?SwapAdvancedSettings

Returns

Promise<QuoteResultsWithSigner>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:68


mergeParams

mergeParams<T>(params): T & TraderParameters

Type parameters

Name
T

Parameters

NameType
paramsT & Partial<TraderParameters>

Returns

T & TraderParameters

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:119


postLimitOrder

postLimitOrder(params, advancedSettings?): Promise<OrderPostingResult>

Parameters

NameType
paramsWithPartialTraderParams<LimitTradeParameters>
advancedSettings?LimitOrderAdvancedSettings

Returns

Promise<OrderPostingResult>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:82


postSellNativeCurrencyOrder

postSellNativeCurrencyOrder(params, advancedSettings?): Promise<Promise<OrderPostingResult>>

Parameters

NameType
paramsWithPartialTraderParams<TradeParameters>
advancedSettings?SwapAdvancedSettings

Returns

Promise<Promise<OrderPostingResult>>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:89


postSwapOrder

postSwapOrder(params, advancedSettings?): Promise<OrderPostingResult>

Parameters

NameType
paramsWithPartialTraderParams<TradeParameters>
advancedSettings?SwapAdvancedSettings

Returns

Promise<OrderPostingResult>

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:75


setTraderParams

setTraderParams(params): TradingSdk

Parameters

NameType
paramsPartial<TraderParameters>

Returns

TradingSdk

Defined in

external/cow-sdk/src/trading/tradingSdk.ts:37