MCPcopy Create free account

hub / github.com/MystenLabs/capybot / functions

Functions103 in github.com/MystenLabs/capybot

↓ 37 callersFunctionsignedShiftRight
(n0: BN, shiftBy: number, bitWidth: number)
src/dexs/turbos/turbos.ts:537
↓ 9 callersMethodtoString
()
src/types/percentage.ts:37
↓ 8 callersFunctiongetTickerPrice
* Get the ticker price for a given symbol. * @param symbol The symbol to get the ticker price for. * @returns The ticker price for the given symbol.
src/utils/binance-ticker-price.ts:11
↓ 7 callersMethodaddStrategy
Add a strategy to this bot. The pools it subscribes to must have been added first.
src/capybot.ts:138
↓ 6 callersFunctionexchangeFetchTickers
( exchange: binance | bitget | coinbaseprime | kraken | kucoin | okx, pairs: string[] )
src/utils/ccxt-fetchTickers.ts:20
↓ 5 callersMethodaddPool
Add a new pool for this bot to use for trading.
src/capybot.ts:161
↓ 4 callersFunctiongetTotalBalanceByCoinType
( provider: JsonRpcProvider, owner: SuiAddress, coinType: string )
src/utils/utils.ts:167
↓ 3 callersMethodcreateSwapTransaction
* Create swap transaction * @param transactionBlock Transaction block * @param params Cetus parameters * @returns Transaction block
src/dexs/cetus/cetus.ts:46
↓ 3 callersMethodgetLatestRate
(pool: string, a2b: boolean)
src/strategies/arbitrage.ts:103
↓ 3 callersFunctionsortByBalance
* Sort coin by balance in an ascending order
src/utils/utils.ts:310
↓ 2 callersMethodadd
* Compute the sum of two `TokenAmount`s. * * @param other Another `TokenAmount`. * @returns The sum of this and the other amount, assuming th
src/types/token_amount.ts:26
↓ 2 callersMethodaddDataSource
Add a new price data source for this bot to use
src/capybot.ts:150
↓ 2 callersFunctionbuildInputCoinForAmount
( txb: TransactionBlock, amount: bigint, coinType: string, owner: SuiAddress, provider: JsonRpcProvi
src/utils/utils.ts:203
↓ 2 callersFunctioncomposeType
(address: string, ...args: unknown[])
src/utils/utils.ts:114
↓ 2 callersFunctiongetCoinDecimals
(coinType: string)
src/utils/utils.ts:329
↓ 2 callersFunctiongetCoinInfo
(coin_type: string)
src/coins/coins.ts:21
↓ 2 callersFunctionisSuiCoin
(coinType: string)
src/utils/utils.ts:53
↓ 2 callersMethodofAmount
Compute this percentage of a given `TokenAmount`.
src/types/percentage.ts:23
↓ 2 callersFunctionselectCoinAssetGreaterThanOrEqual
( coins: CoinAsset[], amount: bigint, exclude: ObjectId[] = [] )
src/utils/utils.ts:261
↓ 2 callersMethodtoRatio
Returns the percentage as a a multiplier, e.g. 10% is returner as 0.1.
src/types/percentage.ts:14
↓ 1 callersFunctionBTCtoUSDC
()
src/utils/binance-ticker-price.ts:33
↓ 1 callersFunctionamountOutWithSlippage
( amountOut: Decimal.Value, slippage: string, amountSpecifiedIsInput: boolean )
src/dexs/turbos/turbos.ts:257
↓ 1 callersFunctionbuildSdkOptions
()
src/dexs/cetus/cetus.ts:22
↓ 1 callersFunctioncalculateTotalBalance
(coins: CoinAsset[])
src/utils/utils.ts:325
↓ 1 callersMethodconvert
Convert the amount of `coinTo` returned if a given amount of `coinFrom` is traded for this price.
src/types/token_price.ts:24
↓ 1 callersMethodcreateCetusTransactionBlockWithSDK
( params: CetusParams )
src/dexs/cetus/cetus.ts:147
↓ 1 callersMethodcreateTurbosTransactionBlockWithSDK
( transactionBlock: TransactionBlock, params: TurbosParams )
src/dexs/turbos/turbos.ts:176
↓ 1 callersMethodestimatePriceAndFee
()
src/dexs/cetus/cetus.ts:132
↓ 1 callersMethodevaluate
(data: DataPoint)
src/strategies/arbitrage.ts:39
↓ 1 callersMethodexecuteTransactionBlock
( transactionBlock: TransactionBlock, strategy: Strategy )
src/capybot.ts:115
↓ 1 callersFunctionextractStructTagFromType
(type: string)
src/utils/utils.ts:57
↓ 1 callersMethodfromRatio
(ratio: number)
src/types/percentage.ts:18
↓ 1 callersMethodgetData
()
src/data_sources/binance/BinanceBTCtoUSDC.ts:13
↓ 1 callersFunctionisSUI
(coinType: string)
src/utils/utils.ts:49
↓ 1 callersMethodloop
(duration: number, delay: number)
src/capybot.ts:39
↓ 1 callersFunctionselectTradeCoins
( provider: JsonRpcProvider, owner: SuiAddress, coinType: string, expectedAmount: Decimal )
src/utils/utils.ts:129
↓ 1 callersMethodsubscribes_to
()
src/strategies/arbitrage.ts:99
↓ 1 callersMethodsubtract
* Compute the difference of two `TokenAmount`s. * * @param other Another `TokenAmount`. * @returns The difference of this and the other amoun
src/types/token_amount.ts:39
↓ 1 callersMethodsubtractFrom
Remove this percentage to a given `TokenAmount`.
src/types/percentage.ts:33
↓ 1 callersFunctiontickIndexToSqrtPriceNegative
(tickIndex: number)
src/dexs/turbos/turbos.ts:278
↓ 1 callersFunctiontickIndexToSqrtPricePositive
(tick: number)
src/dexs/turbos/turbos.ts:398
↓ 1 callersFunctiontickIndexToSqrtPriceX64
(tickIndex: number)
src/dexs/turbos/turbos.ts:270
↓ 1 callersMethodtoString
()
src/types/token_amount.ts:46
FunctionBTCtoUSDT
()
src/utils/binance-ticker-price.ts:22
FunctionSUItoBNB
()
src/utils/binance-ticker-price.ts:77
FunctionSUItoBTC
()
src/utils/binance-ticker-price.ts:66
FunctionSUItoEUR
()
src/utils/binance-ticker-price.ts:88
FunctionSUItoTRY
()
src/utils/binance-ticker-price.ts:99
FunctionSUItoTUSD
()
src/utils/binance-ticker-price.ts:55
FunctionSUItoUSDT
()
src/utils/binance-ticker-price.ts:44
MethodaddTo
Add this percentage to a given `TokenAmount`.
src/types/percentage.ts:28
MethodaddToTransactionBlock
( transactionBlock: TransactionBlock, txbToBeAdded: TransactionBlock )
src/dexs/turbos/turbos.ts:238
FunctionbinanceFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:34
FunctionbinanceFetchTickersAll
()
src/utils/ccxt-fetchTickers.ts:64
FunctionbinanceWatchOrderBook
(symbol)
src/utils/binance-watch-order-book.js:5
FunctionbitgetFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:39
FunctionbuildSdkOptions
()
src/dexs/suiswap/suiswap.ts:27
FunctionbuildSdkOptions
()
src/dexs/turbos/turbos.ts:35
FunctioncoinbaseprimeFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:44
Methodcombine
Assuming `this.coinTo` equals `other.coinFrom`, this method returns the combined price of `this.coinFrom` as `other.coinTo`.
src/types/token_price.ts:32
Functionconstructor
(parameters: any)
src/strategies/strategy.ts:10
Functionconstructor
* Creates an instance of Pool. * @param address The address of the pool. * @param coinTypeA The coin type A for the pool. * @param coinTypeB
src/dexs/pool.ts:33
Functionconstructor
(uri: string)
src/data_sources/data_source.ts:7
Methodconstructor
(keypair: Keypair)
src/capybot.ts:33
Methodconstructor
(price: number, coinFrom: CoinType, coinTo: CoinType)
src/types/token_price.ts:12
Methodconstructor
(amount: number, coin: CoinType)
src/types/token_amount.ts:15
Methodconstructor
(percentage: number)
src/types/percentage.ts:9
Methodconstructor
(fee_in_percent: number)
src/types/percentage.ts:43
Methodconstructor
* * @param pool The swap pool to make trades on. * @param data_source The source of pricing data. * @param short The length of the short movi
src/strategies/ride_the_external_trend.ts:34
Methodconstructor
* Create a new trend-riding strategy. * * @param pool The address of the pool to watch. * @param short The length of the short moving a
src/strategies/ride_the_trend.ts:31
Methodconstructor
* Create a new market difference strategy. This strategy compare prices between a pool and various exchanges and * will buy the token that is too c
src/strategies/market_difference.ts:25
Methodconstructor
* Create a new arbitrage strategy. * * @param poolChain The chain of pools to consider for an arbitrage. The order should be defined such th
src/strategies/arbitrage.ts:27
Methodconstructor
(address: string, coinTypeA: string, coinTypeB: string)
src/dexs/cetus/cetus.ts:31
Methodconstructor
(address: string, coinTypeA: string, coinTypeB: string)
src/dexs/suiswap/suiswap.ts:41
Methodconstructor
( address: string, coinTypeA: string, coinTypeB: string, coinTypeC: string )
src/dexs/turbos/turbos.ts:53
Methodconstructor
()
src/data_sources/binance/BinanceBTCtoUSDC.ts:9
FunctionconvertTradeCoins
( txb: TransactionBlock, coinIds: string[], coinType: string, amount: Decimal )
src/utils/utils.ts:16
MethodcreateSwapTransaction
* Create swap transaction * @param transactionBlock Transaction block * @param params Suiswap parameters * @returns Transaction block
src/dexs/suiswap/suiswap.ts:55
MethodcreateSwapTransaction
* Create swap transaction * @param transactionBlock Transaction block * @param params Turbos parameters * @returns Transaction block
src/dexs/turbos/turbos.ts:81
MethodcreateTransactionBlock
( a2b: boolean, amountIn: number, amountSpecifiedIsInput: boolean, slippage: number )
src/dexs/turbos/turbos.ts:114
MethoddeductFee
Remove this fee from a `TokenAmount`.
src/types/percentage.ts:48
Methoddifference
Compute the ratio of this `TokenPrice` over other as a {@link Percentage}.
src/types/token_price.ts:53
MethodestimatePriceAndFee
()
src/dexs/suiswap/suiswap.ts:108
MethodestimatePriceAndFee
()
src/dexs/turbos/turbos.ts:212
Methodevaluate
(data: DataPoint)
src/strategies/ride_the_external_trend.ts:60
Methodevaluate
(data: DataPoint)
src/strategies/ride_the_trend.ts:45
Methodevaluate
(data: DataPoint)
src/strategies/market_difference.ts:43
FunctiongetBalancesForCoinTypes
( provider: JsonRpcProvider, owner: SuiAddress, coinTypes: Set<string> )
src/utils/utils.ts:184
FunctiongetData
* Method for getting data about the pool. * @returns A Promise of type DataPoint representing data about the pool.
src/dexs/pool.ts:63
MethodincludingFee
Combine this `TokenPrice` with a {@link Fee} computing the gross price including the fee.
src/types/token_price.ts:44
Methodinvert
Get the price where `coinFrom` and `coinTo` are swapped.
src/types/token_price.ts:19
FunctionkrakenFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:49
FunctionkucoinFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:54
FunctionlogStatus
* Report key statistics to the logger. * @param status A map of key-value pairs to report. * @protected
src/strategies/strategy.ts:35
FunctionmoveCallCoinZero
(txb: TransactionBlock, coinType: string)
src/utils/utils.ts:42
FunctionokxFetchTickers
(pairs: string[])
src/utils/ccxt-fetchTickers.ts:59
FunctionselectCoinObjectIdGreaterThanOrEqual
( coins: CoinAsset[], amount: bigint, exclude: ObjectId[] = [] )
src/utils/utils.ts:243
FunctionsortByBalanceDes
(coins: CoinAsset[])
src/utils/utils.ts:317
FunctionsqrtPriceX64ToPrice
( sqrtPriceX64: BN, decimalsA: number, decimalsB: number )
src/dexs/turbos/turbos.ts:246
Methodsubscribes_to
()
src/strategies/ride_the_external_trend.ts:148
next →1–100 of 103, ranked by callers