Documentation ¶
Index ¶
- Constants
- func BuyBinanceBTC(amount float64) (boughtAmount, boughtPrice float64, err error)
- func BuyOsmosisBTC(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, ...) error
- func CheckArbitrage(seedConfig SeedConfig) error
- func CreateGRPCConnection(addr string) (*grpc.ClientConn, error)
- func GetBinanceBTCToUSDTPrice() (float64, error)
- func GetBinanceBTCUSDTBalance() (btcBalance float64, usdtBalance float64, err error)
- func GetBinanceUSDCToBTCPrice() (float64, error)
- func GetOsmosisBTCToUSDCPriceAndRoute(tokenInAmount float64) (float64, []poolmanagertypes.SwapAmountInSplitRoute, error)
- func GetOsmosisBTCUSDTBalance(SeedConfig) (float64, float64, error)
- func GetOsmosisUSDCToBTCPriceAndRoute(tokenInAmount float64) (float64, []poolmanagertypes.SwapAmountInSplitRoute, error)
- func GetTotalBalance(seedConfig SeedConfig) (float64, float64, error)
- func SellBinanceBTC(amount float64) (soldAmount, soldPrice float64, err error)
- func SellOsmosisBTC(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, ...) error
- func SignAndBroadcastAuthenticatorMsgMultiSignersWithBlock(senderPrivKeys []cryptotypes.PrivKey, signerPrivKeys []cryptotypes.PrivKey, ...) error
- func SignAuthenticatorMsgMultiSignersBytes(senderPrivKeys []cryptotypes.PrivKey, signerPrivKeys []cryptotypes.PrivKey, ...) ([]byte, error)
- func SignAuthenticatorMsgWithHeight(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ...) ([]byte, error)
- func SwapWithTopOfBlockAuction(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, ...) error
- type BinanceResponse
- type Pool
- type QuoteResponse
- type Route
- type SeedConfig
Constants ¶
View Source
const ( BTCDenom = "factory/osmo1z0qrq605sjgcqpylfl4aa6s90x738j7m58wyatt0tdzflg2ha26q67k743/wbtc" USDCDenom = "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4" BidDenom = "stake" )
View Source
const ( CHAIN_ID = "osmosis-1" FEE_DENOM = "uosmo" )
Variables ¶
This section is empty.
Functions ¶
func BuyBinanceBTC ¶
func BuyOsmosisBTC ¶
func BuyOsmosisBTC(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, binanceBTCPrice float64) error
func CheckArbitrage ¶
func CheckArbitrage(seedConfig SeedConfig) error
func CreateGRPCConnection ¶
func CreateGRPCConnection(addr string) (*grpc.ClientConn, error)
CreateGRPCConnection createa a grpc connection to a given url
func GetOsmosisBTCToUSDCPriceAndRoute ¶
func GetOsmosisBTCToUSDCPriceAndRoute(tokenInAmount float64) (float64, []poolmanagertypes.SwapAmountInSplitRoute, error)
Note that the amount here should be in human readable exponent E.g) getting usdc price of 1 bitcoin would be GetOsmosisBTCToUSDCPrice(1)
func GetOsmosisBTCUSDTBalance ¶
func GetOsmosisBTCUSDTBalance(SeedConfig) (float64, float64, error)
GetOsmosisBTCUSDTalance returns the balances in human readable exponents
func GetOsmosisUSDCToBTCPriceAndRoute ¶
func GetOsmosisUSDCToBTCPriceAndRoute(tokenInAmount float64) (float64, []poolmanagertypes.SwapAmountInSplitRoute, error)
func GetTotalBalance ¶
func GetTotalBalance(seedConfig SeedConfig) (float64, float64, error)
func SellBinanceBTC ¶
func SellOsmosisBTC ¶
func SellOsmosisBTC(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, binanceBTCPrice float64) error
func SignAndBroadcastAuthenticatorMsgMultiSignersWithBlock ¶
func SignAndBroadcastAuthenticatorMsgMultiSignersWithBlock( senderPrivKeys []cryptotypes.PrivKey, signerPrivKeys []cryptotypes.PrivKey, cosignerPrivKeys map[int][]cryptotypes.PrivKey, encCfg params.EncodingConfig, tm tmservice.ServiceClient, ac authtypes.QueryClient, txClient txtypes.ServiceClient, chainID string, msgs []sdk.Msg, selectedAuthenticators []uint64, ) error
func SignAuthenticatorMsgMultiSignersBytes ¶
func SignAuthenticatorMsgMultiSignersBytes( senderPrivKeys []cryptotypes.PrivKey, signerPrivKeys []cryptotypes.PrivKey, cosignerPrivKeys map[int][]cryptotypes.PrivKey, encCfg params.EncodingConfig, tm tmservice.ServiceClient, ac authtypes.QueryClient, txClient txtypes.ServiceClient, chainID string, msgs []sdk.Msg, selectedAuthenticators []uint64, sequenceOffset uint64, ) ([]byte, error)
func SignAuthenticatorMsgWithHeight ¶
func SignAuthenticatorMsgWithHeight( gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, signers, signatures []cryptotypes.PrivKey, cosigners map[int][]cryptotypes.PrivKey, selectedAuthenticators []uint64, timeoutHeight uint64, ) ([]byte, error)
GenTx generates a signed mock transaction.
func SwapWithTopOfBlockAuction ¶
func SwapWithTopOfBlockAuction(seedConfig SeedConfig, route []poolmanagertypes.SwapAmountInSplitRoute, tokenInDenom string, tokenOutMinAmount uint64, ) error
Types ¶
type BinanceResponse ¶
type QuoteResponse ¶
type SeedConfig ¶
type SeedConfig struct { ChainID string GRPCConnection *grpc.ClientConn EncodingConfig params.EncodingConfig Key *secp256k1.PrivKey DenomMap map[string]string }
func OsmosisInit ¶
func OsmosisInit() (SeedConfig, error)
Click to show internal directories.
Click to hide internal directories.