Documentation ¶
Index ¶
- Variables
- func ProjectFromString(project string) (pb.Project, error)
- type GRPCClient
- func NewGRPCClient() (*GRPCClient, error)
- func NewGRPCClientPumpNY() (*GRPCClient, error)
- func NewGRPCClientWithOpts(opts RPCOpts, dialOpts ...grpc.DialOption) (*GRPCClient, error)
- func NewGRPCDevnet() (*GRPCClient, error)
- func NewGRPCLocal() (*GRPCClient, error)
- func NewGRPCTestnet() (*GRPCClient, error)
- func (g *GRPCClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
- func (g *GRPCClient) GetBlockStream(ctx context.Context) (connections.Streamer[*pb.GetBlockStreamResponse], error)
- func (g *GRPCClient) GetBundleTipStream(ctx context.Context) (connections.Streamer[*pb.GetBundleTipResponse], error)
- func (g *GRPCClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
- func (g *GRPCClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
- func (g *GRPCClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
- func (g *GRPCClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
- func (g *GRPCClient) GetMarketDepthsStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetMarketDepthsStreamResponse], error)
- func (g *GRPCClient) GetMarkets(ctx context.Context) (*pb.GetMarketsResponse, error)
- func (g *GRPCClient) GetMarketsV2(ctx context.Context) (*pb.GetMarketsResponseV2, error)
- func (g *GRPCClient) GetNewRaydiumPoolsByTransactionStream(ctx context.Context, includeCPMM bool) (connections.Streamer[*pb.GetNewRaydiumPoolsByTransactionResponse], error)
- func (g *GRPCClient) GetNewRaydiumPoolsStream(ctx context.Context, includeCPMM bool) (connections.Streamer[*pb.GetNewRaydiumPoolsResponse], error)
- func (g *GRPCClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponse, error)
- func (g *GRPCClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponseV2, error)
- func (g *GRPCClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
- func (g *GRPCClient) GetOrderStatusStream(ctx context.Context, market, ownerAddress string, project pb.Project) (connections.Streamer[*pb.GetOrderStatusStreamResponse], error)
- func (g *GRPCClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
- func (g *GRPCClient) GetOrderbookStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetOrderbooksStreamResponse], error)
- func (g *GRPCClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
- func (g *GRPCClient) GetPoolReservesStream(ctx context.Context, request *pb.GetPoolReservesStreamRequest) (connections.Streamer[*pb.GetPoolReservesStreamResponse], error)
- func (g *GRPCClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
- func (g *GRPCClient) GetPrice(ctx context.Context, tokens []string) (*pb.GetPriceResponse, error)
- func (g *GRPCClient) GetPricesStream(ctx context.Context, projects []pb.Project, tokens []string) (connections.Streamer[*pb.GetPricesStreamResponse], error)
- func (g *GRPCClient) GetPriorityFee(ctx context.Context, request *pb.GetPriorityFeeRequest) (*pb.GetPriorityFeeResponse, error)
- func (g *GRPCClient) GetPriorityFeeByProgram(ctx context.Context, request *pb.GetPriorityFeeByProgramRequest) (*pb.GetPriorityFeeByProgramResponse, error)
- func (g *GRPCClient) GetPriorityFeeStream(ctx context.Context, project pb.Project, percentile *float64) (connections.Streamer[*pb.GetPriorityFeeResponse], error)
- func (g *GRPCClient) GetPumpFunNewTokensStream(ctx context.Context, req *pb.GetPumpFunNewTokensStreamRequest) (connections.Streamer[*pb.GetPumpFunNewTokensStreamResponse], error)
- func (g *GRPCClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
- func (g *GRPCClient) GetPumpFunSwapsStream(ctx context.Context, req *pb.GetPumpFunSwapsStreamRequest) (connections.Streamer[*pb.GetPumpFunSwapsStreamResponse], error)
- func (g *GRPCClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, ...) (*pb.GetQuotesResponse, error)
- func (g *GRPCClient) GetQuotesStream(ctx context.Context, projects []pb.Project, tokenPairs []*pb.TokenPair) (connections.Streamer[*pb.GetQuotesStreamResponse], error)
- func (g *GRPCClient) GetRateLimit(ctx context.Context, request *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
- func (g *GRPCClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
- func (g *GRPCClient) GetRaydiumPools(ctx context.Context, request *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
- func (g *GRPCClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
- func (g *GRPCClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
- func (g *GRPCClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
- func (g *GRPCClient) GetRecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
- func (g *GRPCClient) GetRecentBlockHashStream(ctx context.Context) (connections.Streamer[*pb.GetRecentBlockHashResponse], error)
- func (g *GRPCClient) GetRecentBlockHashV2(ctx context.Context, offset uint64) (*pb.GetRecentBlockHashResponseV2, error)
- func (g *GRPCClient) GetSwapsStream(ctx context.Context, projects []pb.Project, markets []string, ...) (connections.Streamer[*pb.GetSwapsStreamResponse], error)
- func (g *GRPCClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
- func (g *GRPCClient) GetTickersStream(ctx context.Context, request *pb.GetTickersStreamRequest) (connections.Streamer[*pb.GetTickersStreamResponse], error)
- func (g *GRPCClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
- func (g *GRPCClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
- func (g *GRPCClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
- func (g *GRPCClient) GetTradesStream(ctx context.Context, market string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetTradesStreamResponse], error)
- func (g *GRPCClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
- func (g *GRPCClient) GetUnsettled(ctx context.Context, market string, ownerAddress string, project pb.Project) (*pb.GetUnsettledResponse, error)
- func (g *GRPCClient) GetUnsettledV2(ctx context.Context, market string, ownerAddress string) (*pb.GetUnsettledResponse, error)
- func (g *GRPCClient) PostCancelAll(ctx context.Context, market, owner string, openOrders []string, ...) (*pb.PostCancelAllResponse, error)
- func (g *GRPCClient) PostCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (*pb.PostCancelOrderResponse, error)
- func (g *GRPCClient) PostCancelOrder(ctx context.Context, orderID string, side pb.Side, ...) (*pb.PostCancelOrderResponse, error)
- func (g *GRPCClient) PostCancelOrderV2(ctx context.Context, orderID string, clientOrderID uint64, side string, ...) (*pb.PostCancelOrderResponseV2, error)
- func (g *GRPCClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
- func (g *GRPCClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
- func (g *GRPCClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
- func (g *GRPCClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
- func (g *GRPCClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
- func (g *GRPCClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
- func (g *GRPCClient) PostRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
- func (g *GRPCClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
- func (g *GRPCClient) PostReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (g *GRPCClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
- func (g *GRPCClient) PostSettle(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (g *GRPCClient) PostSettleV2(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (g *GRPCClient) PostSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, ...) (*pb.PostSubmitResponse, error)
- func (g *GRPCClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) PostSubmitV2(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, ...) (*pb.PostSubmitResponse, error)
- func (g *GRPCClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, ...) (*pb.TradeSwapResponse, error)
- func (g *GRPCClient) RecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
- func (g *GRPCClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, ...) (string, error)
- func (g *GRPCClient) SubmitCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, ...) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (string, error)
- func (g *GRPCClient) SubmitCancelOrder(ctx context.Context, orderID string, side pb.Side, ...) (string, error)
- func (g *GRPCClient) SubmitCancelOrderV2(ctx context.Context, orderID string, clientOrderID uint64, side string, ...) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (g *GRPCClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (string, error)
- func (g *GRPCClient) SubmitOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, ...) (string, error)
- func (g *GRPCClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
- func (g *GRPCClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
- func (g *GRPCClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (g *GRPCClient) SubmitReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (string, error)
- func (g *GRPCClient) SubmitReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (string, error)
- func (g *GRPCClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (g *GRPCClient) SubmitSettle(ctx context.Context, ...) (string, error)
- func (g *GRPCClient) SubmitSettleV2(ctx context.Context, ...) (string, error)
- func (g *GRPCClient) SubmitTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, ...) (*pb.PostSubmitBatchResponse, error)
- type HTTPClient
- func (h *HTTPClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
- func (h *HTTPClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
- func (h *HTTPClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
- func (h *HTTPClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
- func (h *HTTPClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
- func (h *HTTPClient) GetMarkets(ctx context.Context) (*pb.GetMarketsResponse, error)
- func (h *HTTPClient) GetMarketsV2(ctx context.Context) (*pb.GetMarketsResponseV2, error)
- func (h *HTTPClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponse, error)
- func (h *HTTPClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponse, error)
- func (h *HTTPClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
- func (h *HTTPClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
- func (h *HTTPClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
- func (h *HTTPClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
- func (h *HTTPClient) GetPrice(ctx context.Context, tokens []string) (*pb.GetPriceResponse, error)
- func (h *HTTPClient) GetPriorityFee(ctx context.Context, project pb.Project, percentile *float64) (*pb.GetPriorityFeeResponse, error)
- func (h *HTTPClient) GetPriorityFeeByProgram(ctx context.Context, programs []string) (*pb.GetPriorityFeeByProgramResponse, error)
- func (h *HTTPClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
- func (h *HTTPClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, ...) (*pb.GetQuotesResponse, error)
- func (h *HTTPClient) GetRateLimit(ctx context.Context, _ *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
- func (h *HTTPClient) GetRaydiumCLMMPools(ctx context.Context, request *pb.GetRaydiumCLMMPoolsRequest) (*pb.GetRaydiumCLMMPoolsResponse, error)
- func (h *HTTPClient) GetRaydiumCLMMQuotes(ctx context.Context, request *pb.GetRaydiumCLMMQuotesRequest) (*pb.GetRaydiumCLMMQuotesResponse, error)
- func (h *HTTPClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
- func (h *HTTPClient) GetRaydiumPools(ctx context.Context, _ *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
- func (h *HTTPClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
- func (h *HTTPClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
- func (h *HTTPClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
- func (h *HTTPClient) GetRecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
- func (h *HTTPClient) GetRecentBlockHashV2(ctx context.Context, offset uint64) (*pb.GetRecentBlockHashResponseV2, error)
- func (h *HTTPClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
- func (h *HTTPClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
- func (h *HTTPClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
- func (h *HTTPClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
- func (h *HTTPClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
- func (h *HTTPClient) GetUnsettled(ctx context.Context, market string, owner string, project pb.Project) (*pb.GetUnsettledResponse, error)
- func (h *HTTPClient) GetUnsettledV2(ctx context.Context, market string, owner string) (*pb.GetUnsettledResponse, error)
- func (h *HTTPClient) PostCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, ...) (*pb.PostCancelAllResponse, error)
- func (h *HTTPClient) PostCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (*pb.PostCancelOrderResponse, error)
- func (h *HTTPClient) PostCancelOrder(ctx context.Context, orderID string, side pb.Side, ...) (*pb.PostCancelOrderResponse, error)
- func (h *HTTPClient) PostCancelOrderV2(ctx context.Context, orderID string, clientOrderID uint64, side string, ...) (*pb.PostCancelOrderResponseV2, error)
- func (h *HTTPClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
- func (h *HTTPClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
- func (h *HTTPClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
- func (h *HTTPClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
- func (h *HTTPClient) PostRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
- func (h *HTTPClient) PostRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
- func (h *HTTPClient) PostRaydiumCPMMSwap(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
- func (h *HTTPClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
- func (h *HTTPClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
- func (h *HTTPClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
- func (h *HTTPClient) PostReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (h *HTTPClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
- func (h *HTTPClient) PostSettle(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (h *HTTPClient) PostSettleV2(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (h *HTTPClient) PostSubmit(ctx context.Context, txBase64 string, skipPreFlight bool, ...) (*pb.PostSubmitResponse, error)
- func (h *HTTPClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) PostSubmitV2(ctx context.Context, txBase64 string, skipPreFlight bool, ...) (*pb.PostSubmitResponse, error)
- func (h *HTTPClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, ...) (*pb.TradeSwapResponse, error)
- func (h *HTTPClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, ...) (string, error)
- func (h *HTTPClient) SignAndSubmitBatch(ctx context.Context, transactions []*pb.TransactionMessage, useBundle bool, ...) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitCancelAll(ctx context.Context, market, owner string, openOrders []string, ...) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (string, error)
- func (h *HTTPClient) SubmitCancelOrder(ctx context.Context, orderID string, side pb.Side, ...) (string, error)
- func (h *HTTPClient) SubmitCancelOrderV2(ctx context.Context, orderID string, clientOrderID uint64, side string, ...) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (h *HTTPClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (string, error)
- func (h *HTTPClient) SubmitOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, ...) (string, error)
- func (h *HTTPClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
- func (h *HTTPClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
- func (h *HTTPClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (h *HTTPClient) SubmitReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (string, error)
- func (h *HTTPClient) SubmitReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (string, error)
- func (h *HTTPClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (h *HTTPClient) SubmitSettle(ctx context.Context, ...) (string, error)
- func (h *HTTPClient) SubmitSettleV2(ctx context.Context, ...) (string, error)
- func (h *HTTPClient) SubmitTradeSwap(ctx context.Context, owner, inToken, outToken string, ...) (*pb.PostSubmitBatchResponse, error)
- type PostOrderOpts
- type RPCOpts
- type SubmitOpts
- type WSClient
- func (w *WSClient) Close() error
- func (w *WSClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
- func (w *WSClient) GetBlockStream(ctx context.Context) (connections.Streamer[*pb.GetBlockStreamResponse], error)
- func (w *WSClient) GetBundleTipStream(ctx context.Context) (connections.Streamer[*pb.GetBundleTipResponse], error)
- func (w *WSClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
- func (w *WSClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
- func (w *WSClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
- func (w *WSClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
- func (w *WSClient) GetMarketDepthsStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetMarketDepthsStreamResponse], error)
- func (w *WSClient) GetMarkets(ctx context.Context) (*pb.GetMarketsResponse, error)
- func (w *WSClient) GetMarketsV2(ctx context.Context) (*pb.GetMarketsResponse, error)
- func (w *WSClient) GetNewRaydiumPoolsByTransactionStream(ctx context.Context) (connections.Streamer[*pb.GetNewRaydiumPoolsByTransactionResponse], error)
- func (w *WSClient) GetNewRaydiumPoolsStream(ctx context.Context, includeCPMM bool) (connections.Streamer[*pb.GetNewRaydiumPoolsResponse], error)
- func (w *WSClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponse, error)
- func (w *WSClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, ...) (*pb.GetOpenOrdersResponse, error)
- func (w *WSClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
- func (w *WSClient) GetOrderStatusStream(ctx context.Context, market, ownerAddress string, project pb.Project) (connections.Streamer[*pb.GetOrderStatusStreamResponse], error)
- func (w *WSClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
- func (w *WSClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
- func (w *WSClient) GetOrderbooksStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetOrderbooksStreamResponse], error)
- func (w *WSClient) GetPoolReservesStream(ctx context.Context, request *pb.GetPoolReservesStreamRequest) (connections.Streamer[*pb.GetPoolReservesStreamResponse], error)
- func (w *WSClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
- func (w *WSClient) GetPrice(ctx context.Context, tokens []string) (*pb.GetPriceResponse, error)
- func (w *WSClient) GetPricesStream(ctx context.Context, projects []pb.Project, tokens []string) (connections.Streamer[*pb.GetPricesStreamResponse], error)
- func (w *WSClient) GetPriorityFee(ctx context.Context, project pb.Project, percentile *float64) (*pb.GetPriorityFeeResponse, error)
- func (w *WSClient) GetPriorityFeeByProgram(ctx context.Context, programs []string) (*pb.GetPriorityFeeByProgramResponse, error)
- func (w *WSClient) GetPriorityFeeStream(ctx context.Context, project pb.Project, percentile *float64) (connections.Streamer[*pb.GetPriorityFeeResponse], error)
- func (w *WSClient) GetPumpFunNewTokensStream(ctx context.Context, req *pb.GetPumpFunNewTokensStreamRequest) (connections.Streamer[*pb.GetPumpFunNewTokensStreamResponse], error)
- func (w *WSClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
- func (w *WSClient) GetPumpFunSwapsStream(ctx context.Context, req *pb.GetPumpFunSwapsStreamRequest) (connections.Streamer[*pb.GetPumpFunSwapsStreamResponse], error)
- func (w *WSClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, ...) (*pb.GetQuotesResponse, error)
- func (w *WSClient) GetQuotesStream(ctx context.Context, projects []pb.Project, tokenPairs []*pb.TokenPair) (connections.Streamer[*pb.GetQuotesStreamResponse], error)
- func (w *WSClient) GetRateLimit(ctx context.Context, request *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
- func (w *WSClient) GetRaydiumCLMMPools(ctx context.Context, request *pb.GetRaydiumCLMMPoolsRequest) (*pb.GetRaydiumCLMMPoolsResponse, error)
- func (w *WSClient) GetRaydiumCLMMQuotes(ctx context.Context, request *pb.GetRaydiumCLMMQuotesRequest) (*pb.GetRaydiumCLMMQuotesResponse, error)
- func (w *WSClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
- func (w *WSClient) GetRaydiumPools(ctx context.Context, request *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
- func (w *WSClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
- func (w *WSClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
- func (w *WSClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
- func (w *WSClient) GetRecentBlockHash(ctx context.Context, request *pb.GetRecentBlockHashRequest) (*pb.GetRecentBlockHashResponse, error)
- func (w *WSClient) GetRecentBlockHashStream(ctx context.Context) (connections.Streamer[*pb.GetRecentBlockHashResponse], error)
- func (w *WSClient) GetRecentBlockHashV2(ctx context.Context, request *pb.GetRecentBlockHashRequestV2) (*pb.GetRecentBlockHashResponseV2, error)
- func (w *WSClient) GetSwapsStream(ctx context.Context, projects []pb.Project, markets []string, ...) (connections.Streamer[*pb.GetSwapsStreamResponse], error)
- func (w *WSClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
- func (w *WSClient) GetTickersStream(ctx context.Context, request *pb.GetTickersStreamRequest) (connections.Streamer[*pb.GetTickersStreamResponse], error)
- func (w *WSClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
- func (w *WSClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
- func (w *WSClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
- func (w *WSClient) GetTradesStream(ctx context.Context, market string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetTradesStreamResponse], error)
- func (w *WSClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
- func (w *WSClient) GetUnsettled(ctx context.Context, market string, ownerAddress string, project pb.Project) (*pb.GetUnsettledResponse, error)
- func (w *WSClient) GetUnsettledV2(ctx context.Context, market string, ownerAddress string) (*pb.GetUnsettledResponse, error)
- func (w *WSClient) PostCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, ...) (*pb.PostCancelAllResponse, error)
- func (w *WSClient) PostCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (*pb.PostCancelOrderResponse, error)
- func (w *WSClient) PostCancelOrder(ctx context.Context, request *pb.PostCancelOrderRequest) (*pb.PostCancelOrderResponse, error)
- func (w *WSClient) PostCancelOrderV2(ctx context.Context, request *pb.PostCancelOrderRequestV2) (*pb.PostCancelOrderResponseV2, error)
- func (w *WSClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
- func (w *WSClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
- func (w *WSClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
- func (w *WSClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (w *WSClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (w *WSClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
- func (w *WSClient) PostRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
- func (w *WSClient) PostRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
- func (w *WSClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
- func (w *WSClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
- func (w *WSClient) PostRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
- func (w *WSClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
- func (w *WSClient) PostReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (w *WSClient) PostReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (*pb.PostOrderResponse, error)
- func (w *WSClient) PostReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (*pb.PostOrderResponse, error)
- func (w *WSClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
- func (w *WSClient) PostSettle(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (w *WSClient) PostSettleV2(ctx context.Context, ...) (*pb.PostSettleResponse, error)
- func (w *WSClient) PostSubmit(ctx context.Context, txBase64 string, skipPreFlight bool, ...) (*pb.PostSubmitResponse, error)
- func (w *WSClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) PostSubmitV2(ctx context.Context, txBase64 string, skipPreFlight bool, useBundle bool, ...) (*pb.PostSubmitResponse, error)
- func (w *WSClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, ...) (*pb.TradeSwapResponse, error)
- func (w *WSClient) PostTradeSwapWithPriorityFee(ctx context.Context, ownerAddress, inToken, outToken string, ...) (*pb.TradeSwapResponse, error)
- func (w *WSClient) RecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
- func (w *WSClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, ...) (string, error)
- func (w *WSClient) SignAndSubmitBatch(ctx context.Context, transactions []*pb.TransactionMessage, useBundle bool, ...) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, ...) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitCancelByClientOrderID(ctx context.Context, clientOrderID uint64, owner, market, openOrders string, ...) (string, error)
- func (w *WSClient) SubmitCancelOrder(ctx context.Context, request *pb.PostCancelOrderRequest, skipPreFlight bool) (string, error)
- func (w *WSClient) SubmitCancelOrderV2(ctx context.Context, request *pb.PostCancelOrderRequestV2, skipPreFlight bool) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (w *WSClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, ...) (string, error)
- func (w *WSClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
- func (w *WSClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
- func (w *WSClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, ...) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, ...) (string, error)
- func (w *WSClient) SubmitReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, ...) (string, error)
- func (w *WSClient) SubmitReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, ...) (string, error)
- func (w *WSClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitSettle(ctx context.Context, ...) (string, error)
- func (w *WSClient) SubmitSettleV2(ctx context.Context, ...) (string, error)
- func (w *WSClient) SubmitTradeSwap(ctx context.Context, owner, inToken, outToken string, ...) (*pb.PostSubmitBatchResponse, error)
- func (w *WSClient) SubmitTradeSwapWithPriorityFee(ctx context.Context, owner, inToken, outToken string, ...) (*pb.PostSubmitBatchResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( MainnetNYHTTP = httpEndpoint(mainnetNY, true) MainnetPumpNYHTTP = httpEndpoint(mainnetPumpNY, true) MainnetUKHTTP = httpEndpoint(mainnetUK, true) MainnetNYWS = wsEndpoint(mainnetNY, true) MainnetPumpNYWS = wsEndpoint(mainnetPumpNY, true) MainnetUKWS = wsEndpoint(mainnetUK, true) MainnetNYGRPC = grpcEndpoint(mainnetNY, true) MainnetPumpNYGRPC = grpcEndpoint(mainnetPumpNY, true) MainnetUKGRPC = grpcEndpoint(mainnetUK, true) TestnetHTTP = httpEndpoint(testnet, true) TestnetWS = wsEndpoint(testnet, true) TestnetGRPC = grpcEndpoint(testnet, true) DevnetHTTP = httpEndpoint(devnet, false) DevnetWS = wsEndpoint(devnet, false) DevnetGRPC = grpcEndpoint(devnet, false) LocalHTTP = "http://localhost:9000" LocalWS = "ws://localhost:9000/ws" LocalGRPC = "localhost:9000" )
var ErrPrivateKeyNotFound = errors.New("private key not provided for signing transaction")
Functions ¶
Types ¶
type GRPCClient ¶
type GRPCClient struct { pb.UnimplementedApiServer // contains filtered or unexported fields }
func NewGRPCClient ¶
func NewGRPCClient() (*GRPCClient, error)
NewGRPCClient connects to Mainnet Trader API
func NewGRPCClientPumpNY ¶
func NewGRPCClientPumpNY() (*GRPCClient, error)
NewGRPCClientPumpNY connects to Mainnet NY Pump Trader API
func NewGRPCClientWithOpts ¶
func NewGRPCClientWithOpts(opts RPCOpts, dialOpts ...grpc.DialOption) (*GRPCClient, error)
NewGRPCClientWithOpts connects to custom Trader API
func NewGRPCDevnet ¶
func NewGRPCDevnet() (*GRPCClient, error)
NewGRPCDevnet connects to Devnet Trader API
func NewGRPCLocal ¶
func NewGRPCLocal() (*GRPCClient, error)
NewGRPCLocal connects to local Trader API
func NewGRPCTestnet ¶
func NewGRPCTestnet() (*GRPCClient, error)
NewGRPCTestnet connects to Testnet Trader API
func (*GRPCClient) GetAccountBalance ¶
func (g *GRPCClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
GetAccountBalance returns all tokens associated with the owner address including Serum unsettled amounts
func (*GRPCClient) GetBlockStream ¶
func (g *GRPCClient) GetBlockStream(ctx context.Context) (connections.Streamer[*pb.GetBlockStreamResponse], error)
GetBlockStream subscribes to a stream for getting recent blocks.
func (*GRPCClient) GetBundleTipStream ¶
func (g *GRPCClient) GetBundleTipStream(ctx context.Context) (connections.Streamer[*pb.GetBundleTipResponse], error)
GetBundleTipStream subscribes to a stream of bundle tip percentiles
func (*GRPCClient) GetJupiterPrices ¶
func (g *GRPCClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
GetJupiterPrices returns the USDC price of requested tokens on Jupiter
func (*GRPCClient) GetJupiterQuotes ¶
func (g *GRPCClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
GetJupiterQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Jupiter
func (*GRPCClient) GetMarketDepth ¶
func (g *GRPCClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
GetMarketDepth returns the requested market's coalesced price data (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*GRPCClient) GetMarketDepthV2 ¶
func (g *GRPCClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
GetMarketDepthV2 returns the requested market's coalesced price data (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*GRPCClient) GetMarketDepthsStream ¶
func (g *GRPCClient) GetMarketDepthsStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetMarketDepthsStreamResponse], error)
GetMarketDepthsStream subscribes to a stream for changes to the requested market data updates (e.g. asks and bids. Set limit to 0 for all bids/ asks).
func (*GRPCClient) GetMarkets ¶
func (g *GRPCClient) GetMarkets(ctx context.Context) (*pb.GetMarketsResponse, error)
GetMarkets returns the list of all available named markets
func (*GRPCClient) GetMarketsV2 ¶
func (g *GRPCClient) GetMarketsV2(ctx context.Context) (*pb.GetMarketsResponseV2, error)
GetMarketsV2 returns the list of all available named markets
func (*GRPCClient) GetNewRaydiumPoolsByTransactionStream ¶
func (g *GRPCClient) GetNewRaydiumPoolsByTransactionStream( ctx context.Context, includeCPMM bool, ) (connections.Streamer[*pb.GetNewRaydiumPoolsByTransactionResponse], error)
func (*GRPCClient) GetNewRaydiumPoolsStream ¶
func (g *GRPCClient) GetNewRaydiumPoolsStream( ctx context.Context, includeCPMM bool, ) (connections.Streamer[*pb.GetNewRaydiumPoolsResponse], error)
GetNewRaydiumPoolsStream subscribes to a stream for getting recent swaps on projects & markets of interest with option to include Raydium cpmm amm.
func (*GRPCClient) GetOpenOrders ¶
func (g *GRPCClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, project pb.Project) (*pb.GetOpenOrdersResponse, error)
GetOpenOrders returns all open orders by owner address and market
func (*GRPCClient) GetOpenOrdersV2 ¶
func (g *GRPCClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, orderID string, clientOrderID uint64) (*pb.GetOpenOrdersResponseV2, error)
GetOpenOrdersV2 returns all open orders by owner address and market
func (*GRPCClient) GetOrderByID ¶
func (g *GRPCClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
GetOrderByID returns an order by id
func (*GRPCClient) GetOrderStatusStream ¶
func (g *GRPCClient) GetOrderStatusStream(ctx context.Context, market, ownerAddress string, project pb.Project) (connections.Streamer[*pb.GetOrderStatusStreamResponse], error)
GetOrderStatusStream subscribes to a stream that shows updates to the owner's orders
func (*GRPCClient) GetOrderbook ¶
func (g *GRPCClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
GetOrderbook returns the requested market's orderbook (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*GRPCClient) GetOrderbookStream ¶
func (g *GRPCClient) GetOrderbookStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetOrderbooksStreamResponse], error)
GetOrderbookStream subscribes to a stream for changes to the requested market updates (e.g. asks and bids. Set limit to 0 for all bids/ asks).
func (*GRPCClient) GetOrderbookV2 ¶
func (g *GRPCClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
GetOrderbookV2 returns the requested market's orderbook (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*GRPCClient) GetPoolReservesStream ¶
func (g *GRPCClient) GetPoolReservesStream(ctx context.Context, request *pb.GetPoolReservesStreamRequest) (connections.Streamer[*pb.GetPoolReservesStreamResponse], error)
GetPoolReservesStream subscribes to a stream for getting recent quotes of tokens of interest.
func (*GRPCClient) GetPools ¶
func (g *GRPCClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
GetPools returns pools for given projects.
func (*GRPCClient) GetPrice ¶
func (g *GRPCClient) GetPrice(ctx context.Context, tokens []string) (*pb.GetPriceResponse, error)
GetPrice returns the USDC price of requested tokens
func (*GRPCClient) GetPricesStream ¶
func (g *GRPCClient) GetPricesStream(ctx context.Context, projects []pb.Project, tokens []string) (connections.Streamer[*pb.GetPricesStreamResponse], error)
GetPricesStream subscribes to a stream for getting recent prices of tokens of interest.
func (*GRPCClient) GetPriorityFee ¶
func (g *GRPCClient) GetPriorityFee(ctx context.Context, request *pb.GetPriorityFeeRequest) (*pb.GetPriorityFeeResponse, error)
GetPriorityFee returns a priority fee estimate for a given percentile
func (*GRPCClient) GetPriorityFeeByProgram ¶
func (g *GRPCClient) GetPriorityFeeByProgram(ctx context.Context, request *pb.GetPriorityFeeByProgramRequest) (*pb.GetPriorityFeeByProgramResponse, error)
GetPriorityFeeByProgram returns priority fees for given programs
func (*GRPCClient) GetPriorityFeeStream ¶
func (g *GRPCClient) GetPriorityFeeStream(ctx context.Context, project pb.Project, percentile *float64) (connections.Streamer[*pb.GetPriorityFeeResponse], error)
GetPriorityFeeStream subscribes to a stream of priority fees for a given percentile
func (*GRPCClient) GetPumpFunNewTokensStream ¶
func (g *GRPCClient) GetPumpFunNewTokensStream(ctx context.Context, req *pb.GetPumpFunNewTokensStreamRequest) (connections.Streamer[*pb.GetPumpFunNewTokensStreamResponse], error)
GetPumpFunNewTokensStream subscribes to a stream for pumpdotfun's new pool events
func (*GRPCClient) GetPumpFunQuotes ¶
func (g *GRPCClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
GetPumpFunQuotes returns the best quotes for swapping a token on PumpFun platform
func (*GRPCClient) GetPumpFunSwapsStream ¶
func (g *GRPCClient) GetPumpFunSwapsStream(ctx context.Context, req *pb.GetPumpFunSwapsStreamRequest) (connections.Streamer[*pb.GetPumpFunSwapsStreamResponse], error)
GetPumpFunSwapsStream subscribes to a stream for swap events related to a set of pumpdotfun tokens
func (*GRPCClient) GetQuotes ¶
func (g *GRPCClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, limit int32, projects []pb.Project) (*pb.GetQuotesResponse, error)
GetQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it
func (*GRPCClient) GetQuotesStream ¶
func (g *GRPCClient) GetQuotesStream(ctx context.Context, projects []pb.Project, tokenPairs []*pb.TokenPair) (connections.Streamer[*pb.GetQuotesStreamResponse], error)
GetQuotesStream subscribes to a stream for getting recent quotes of tokens of interest.
func (*GRPCClient) GetRateLimit ¶
func (g *GRPCClient) GetRateLimit(ctx context.Context, request *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
GetRateLimit returns details of an account rate-limits
func (*GRPCClient) GetRaydiumPoolReserve ¶
func (g *GRPCClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
GetRaydiumPoolReserve returns pools details for a given set of pairs or addresses on Raydium
func (*GRPCClient) GetRaydiumPools ¶
func (g *GRPCClient) GetRaydiumPools(ctx context.Context, request *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
GetRaydiumPools returns pools on Raydium
func (*GRPCClient) GetRaydiumPrices ¶
func (g *GRPCClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
GetRaydiumPrices returns the USDC price of requested tokens on Raydium
func (*GRPCClient) GetRaydiumQuotes ¶
func (g *GRPCClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
GetRaydiumQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium
func (*GRPCClient) GetRaydiumQuotesCPMM ¶
func (g *GRPCClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
GetRaydiumQuotesCPMM returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium CPMM pool
func (*GRPCClient) GetRecentBlockHash ¶
func (g *GRPCClient) GetRecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
GetRecentBlockHash returns recent block hash.
func (*GRPCClient) GetRecentBlockHashStream ¶
func (g *GRPCClient) GetRecentBlockHashStream(ctx context.Context) (connections.Streamer[*pb.GetRecentBlockHashResponse], error)
GetRecentBlockHashStream subscribes to a stream for getting recent block hash.
func (*GRPCClient) GetRecentBlockHashV2 ¶
func (g *GRPCClient) GetRecentBlockHashV2(ctx context.Context, offset uint64) (*pb.GetRecentBlockHashResponseV2, error)
GetRecentBlockHash returns recent block hash, supports optional offset.
func (*GRPCClient) GetSwapsStream ¶
func (g *GRPCClient) GetSwapsStream( ctx context.Context, projects []pb.Project, markets []string, includeFailed bool, ) (connections.Streamer[*pb.GetSwapsStreamResponse], error)
GetSwapsStream subscribes to a stream for getting recent swaps on projects & markets of interest.
func (*GRPCClient) GetTickers ¶
func (g *GRPCClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
GetTickers returns the requested market tickets. Set market to "" for all markets.
func (*GRPCClient) GetTickersStream ¶
func (g *GRPCClient) GetTickersStream(ctx context.Context, request *pb.GetTickersStreamRequest) (connections.Streamer[*pb.GetTickersStreamResponse], error)
GetTickersStream subscribes to a stream for getting recent tickers of specified markets.
func (*GRPCClient) GetTickersV2 ¶
func (g *GRPCClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
GetTickersV2 returns the requested market tickets. Set market to "" for all markets.
func (*GRPCClient) GetTokenAccounts ¶
func (g *GRPCClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
GetTokenAccounts returns all tokens associated with the owner address
func (*GRPCClient) GetTrades ¶
func (g *GRPCClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
GetTrades returns the requested market's currently executing trades. Set limit to 0 for all trades.
func (*GRPCClient) GetTradesStream ¶
func (g *GRPCClient) GetTradesStream(ctx context.Context, market string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetTradesStreamResponse], error)
GetTradesStream subscribes to a stream for trades as they execute. Set limit to 0 for all trades.
func (*GRPCClient) GetTransaction ¶
func (g *GRPCClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
GetTransaction returns details of a recent transaction
func (*GRPCClient) GetUnsettled ¶
func (g *GRPCClient) GetUnsettled(ctx context.Context, market string, ownerAddress string, project pb.Project) (*pb.GetUnsettledResponse, error)
GetUnsettled returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*GRPCClient) GetUnsettledV2 ¶
func (g *GRPCClient) GetUnsettledV2(ctx context.Context, market string, ownerAddress string) (*pb.GetUnsettledResponse, error)
GetUnsettledV2 returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*GRPCClient) PostCancelAll ¶
func (g *GRPCClient) PostCancelAll(ctx context.Context, market, owner string, openOrders []string, project pb.Project) (*pb.PostCancelAllResponse, error)
func (*GRPCClient) PostCancelByClientOrderID ¶
func (g *GRPCClient) PostCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, ) (*pb.PostCancelOrderResponse, error)
PostCancelByClientOrderID builds a Serum cancel order by client ID.
func (*GRPCClient) PostCancelOrder ¶
func (g *GRPCClient) PostCancelOrder( ctx context.Context, orderID string, side pb.Side, owner, market, openOrders string, project pb.Project, ) (*pb.PostCancelOrderResponse, error)
PostCancelOrder builds a Serum cancel order.
func (*GRPCClient) PostCancelOrderV2 ¶
func (g *GRPCClient) PostCancelOrderV2( ctx context.Context, orderID string, clientOrderID uint64, side string, owner, market, openOrders string, ) (*pb.PostCancelOrderResponseV2, error)
PostCancelOrderV2 builds a Serum cancel order.
func (*GRPCClient) PostJupiterRouteSwap ¶
func (g *GRPCClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
PostJupiterRouteSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*GRPCClient) PostJupiterSwap ¶
func (g *GRPCClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
PostJupiterSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*GRPCClient) PostJupiterSwapInstructions ¶
func (g *GRPCClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
PostJupiterSwapInstructions returns instructions to build a transaction and submit it on jupiter
func (*GRPCClient) PostOrder ¶
func (g *GRPCClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrder returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*GRPCClient) PostOrderV2 ¶
func (g *GRPCClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, bundleTip *uint64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrderV2 returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*GRPCClient) PostOrderV2WithPriorityFee ¶
func (g *GRPCClient) PostOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, computeLimit uint32, computePrice uint64, bundleTip *uint64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrderV2WithPriorityFee returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*GRPCClient) PostPumpFunSwap ¶
func (g *GRPCClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
PostPumpFunSwap returns a partially signed transaction(s) for submitting a swap request on Pumpdotfun platform
func (*GRPCClient) PostRaydiumRouteSwap ¶
func (g *GRPCClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
PostRaydiumRouteSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*GRPCClient) PostRaydiumSwap ¶
func (g *GRPCClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
PostRaydiumSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*GRPCClient) PostRaydiumSwapCPMM ¶
func (g *GRPCClient) PostRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
PostRaydiumSwapCPMM returns a partially signed transaction(s) for submitting a swap request on Raydium CPMM Pool
func (*GRPCClient) PostRaydiumSwapInstructions ¶
func (g *GRPCClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
PostRaydiumSwapInstructions returns instructions to build a transaction and submit it on raydium
func (*GRPCClient) PostReplaceByClientOrderID ¶
func (g *GRPCClient) PostReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*GRPCClient) PostReplaceOrder ¶
func (g *GRPCClient) PostReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*GRPCClient) PostReplaceOrderV2 ¶
func (g *GRPCClient) PostReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*GRPCClient) PostRouteTradeSwap ¶
func (g *GRPCClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
PostRouteTradeSwap returns a partially signed transaction(s) for submitting a swap request
func (*GRPCClient) PostSettle ¶
func (g *GRPCClient) PostSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project) (*pb.PostSettleResponse, error)
PostSettle returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*GRPCClient) PostSettleV2 ¶
func (g *GRPCClient) PostSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string) (*pb.PostSettleResponse, error)
PostSettleV2 returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*GRPCClient) PostSubmit ¶
func (g *GRPCClient) PostSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (*pb.PostSubmitResponse, error)
PostSubmit posts the transaction string to the Solana network.
func (*GRPCClient) PostSubmitBatch ¶
func (g *GRPCClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatch posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*GRPCClient) PostSubmitBatchV2 ¶
func (g *GRPCClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatchV2 posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*GRPCClient) PostSubmitV2 ¶
func (g *GRPCClient) PostSubmitV2(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, frontRunningProtection bool, tpu uint32) (*pb.PostSubmitResponse, error)
PostSubmitV2 posts the transaction string to the Solana network.
func (*GRPCClient) PostTradeSwap ¶
func (g *GRPCClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, inAmount, slippage float64, project pb.Project) (*pb.TradeSwapResponse, error)
PostTradeSwap returns a partially signed transaction for submitting a swap request
func (*GRPCClient) RecentBlockHash ¶
func (g *GRPCClient) RecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
func (*GRPCClient) SignAndSubmit ¶
func (g *GRPCClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (string, error)
SignAndSubmit signs the given transaction and submits it.
func (*GRPCClient) SubmitCancelAll ¶
func (g *GRPCClient) SubmitCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, project pb.Project, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
func (*GRPCClient) SubmitCancelByClientOrderID ¶
func (g *GRPCClient) SubmitCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, skipPreFlight bool, ) (string, error)
SubmitCancelByClientOrderID builds a Serum cancel order by client ID, signs and submits it to the network.
func (*GRPCClient) SubmitCancelOrder ¶
func (g *GRPCClient) SubmitCancelOrder( ctx context.Context, orderID string, side pb.Side, owner, market, openOrders string, project pb.Project, skipPreFlight bool, ) (string, error)
SubmitCancelOrder builds a Serum cancel order, signs and submits it to the network.
func (*GRPCClient) SubmitCancelOrderV2 ¶
func (g *GRPCClient) SubmitCancelOrderV2( ctx context.Context, orderID string, clientOrderID uint64, side string, owner, market, openOrders string, opts SubmitOpts, ) (*pb.PostSubmitBatchResponse, error)
SubmitCancelOrderV2 builds a Serum cancel order, signs and submits it to the network.
func (*GRPCClient) SubmitJupiterRouteSwap ¶
func (g *GRPCClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterRouteSwap builds a Jupiter RouteSwap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitJupiterSwap ¶
func (g *GRPCClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwap builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitJupiterSwapInstructions ¶
func (g *GRPCClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwapInstructions builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitOrder ¶
func (g *GRPCClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (string, error)
SubmitOrder builds a Serum market order, signs it, and submits to the network.
func (*GRPCClient) SubmitOrderV2 ¶
func (g *GRPCClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, bundleTip *uint64, opts PostOrderOpts) (string, error)
SubmitOrderV2 builds a Serum market order, signs it, and submits to the network.
func (*GRPCClient) SubmitOrderV2WithPriorityFee ¶
func (g *GRPCClient) SubmitOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, computeLimit uint32, computePrice uint64, bundleTip *uint64, opts PostOrderOpts) (string, error)
SubmitOrderV2WithPriorityFee builds a Serum market order, signs it, and submits to the network with specified computeLimit and computePrice
func (*GRPCClient) SubmitPostPumpFunSwap ¶
func (g *GRPCClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
SubmitPostPumpFunSwap builds a pumpfun Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumCLMMRouteSwap ¶
func (g *GRPCClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMRouteSwap builds a Raydium RouteSwap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumCLMMSwap ¶
func (g *GRPCClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMSwap builds a Raydium Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumRouteSwap ¶
func (g *GRPCClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumRouteSwap builds a Raydium RouteSwap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumSwap ¶
func (g *GRPCClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwap builds a Raydium Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumSwapCPMM ¶
func (g *GRPCClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
SubmitRaydiumSwapCPMM builds a Raydium Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitRaydiumSwapInstructions ¶
func (g *GRPCClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwapInstructions builds a Raydium Swap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitReplaceByClientOrderID ¶
func (*GRPCClient) SubmitReplaceOrder ¶
func (*GRPCClient) SubmitReplaceOrderV2 ¶
func (g *GRPCClient) SubmitReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (string, error)
func (*GRPCClient) SubmitRouteTradeSwap ¶
func (g *GRPCClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRouteTradeSwap builds a RouteTradeSwap transaction then signs it, and submits to the network.
func (*GRPCClient) SubmitSettle ¶
func (g *GRPCClient) SubmitSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project, skipPreflight bool) (string, error)
SubmitSettle builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*GRPCClient) SubmitSettleV2 ¶
func (g *GRPCClient) SubmitSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, skipPreflight bool) (string, error)
SubmitSettleV2 builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*GRPCClient) SubmitTradeSwap ¶
func (g *GRPCClient) SubmitTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, inAmount, slippage float64, project pb.Project, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitTradeSwap builds a TradeSwap transaction then signs it, and submits to the network.
type HTTPClient ¶
type HTTPClient struct { pb.UnimplementedApiServer // contains filtered or unexported fields }
func NewHTTPClientPumpNY ¶
func NewHTTPClientPumpNY() *HTTPClient
NewHTTPClientPumpNY connects to Mainnet Trader API
func NewHTTPClientWithOpts ¶
func NewHTTPClientWithOpts(client *http.Client, opts RPCOpts) *HTTPClient
NewHTTPClientWithOpts connects to custom Trader API (set client to nil to use default client)
func NewHTTPTestnet ¶
func NewHTTPTestnet() *HTTPClient
NewHTTPTestnet connects to Testnet Trader API
func (*HTTPClient) GetAccountBalance ¶
func (h *HTTPClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
GetAccountBalance returns all OpenOrders accounts for a given market with the amountsctx context.Context, of unsettled funds
func (*HTTPClient) GetJupiterPrices ¶
func (h *HTTPClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
GetJupiterPrices returns the USDC price of requested tokens on Jupiter
func (*HTTPClient) GetJupiterQuotes ¶
func (h *HTTPClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
GetJupiterQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Jupiter
func (*HTTPClient) GetMarketDepth ¶
func (h *HTTPClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
GetMarketDepth returns the requested market's coalesced price data (e.h. asks and bids). Set limit to 0 for all bids / asks.
func (*HTTPClient) GetMarketDepthV2 ¶
func (h *HTTPClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
GetMarketDepthV2 returns the requested market's coalesced price data (e.h. asks and bids). Set limit to 0 for all bids / asks.
func (*HTTPClient) GetMarkets ¶
func (h *HTTPClient) GetMarkets(ctx context.Context) (*pb.GetMarketsResponse, error)
GetMarkets returns the list of all available named markets
func (*HTTPClient) GetMarketsV2 ¶
func (h *HTTPClient) GetMarketsV2(ctx context.Context) (*pb.GetMarketsResponseV2, error)
GetMarketsV2 returns the list of all available named markets
func (*HTTPClient) GetOpenOrders ¶
func (h *HTTPClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, project pb.Project) (*pb.GetOpenOrdersResponse, error)
GetOpenOrders returns all open orders by owner address and market
func (*HTTPClient) GetOpenOrdersV2 ¶
func (h *HTTPClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, orderID string, clientOrderID uint64) (*pb.GetOpenOrdersResponse, error)
GetOpenOrdersV2 returns all open orders by owner address and market
func (*HTTPClient) GetOrderByID ¶
func (h *HTTPClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
GetOrderByID returns an order by id
func (*HTTPClient) GetOrderbook ¶
func (h *HTTPClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
GetOrderbook returns the requested market's orderbook (e.h. asks and bids). Set limit to 0 for all bids / asks.
func (*HTTPClient) GetOrderbookV2 ¶
func (h *HTTPClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
GetOrderbookV2 returns the requested market's orderbook (e.h. asks and bids). Set limit to 0 for all bids / asks.
func (*HTTPClient) GetPools ¶
func (h *HTTPClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
GetPools returns pools for given projects.
func (*HTTPClient) GetPrice ¶
func (h *HTTPClient) GetPrice(ctx context.Context, tokens []string) (*pb.GetPriceResponse, error)
GetPrice returns the USDC price of requested tokens
func (*HTTPClient) GetPriorityFee ¶
func (h *HTTPClient) GetPriorityFee(ctx context.Context, project pb.Project, percentile *float64) (*pb.GetPriorityFeeResponse, error)
func (*HTTPClient) GetPriorityFeeByProgram ¶
func (h *HTTPClient) GetPriorityFeeByProgram(ctx context.Context, programs []string) (*pb.GetPriorityFeeByProgramResponse, error)
func (*HTTPClient) GetPumpFunQuotes ¶
func (h *HTTPClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
GetPumpFunQuotes returns the best quotes for swapping a token on PumpFun platform
func (*HTTPClient) GetQuotes ¶
func (h *HTTPClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, limit int32, projects []pb.Project) (*pb.GetQuotesResponse, error)
GetQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it
func (*HTTPClient) GetRateLimit ¶
func (h *HTTPClient) GetRateLimit(ctx context.Context, _ *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
GetRateLimit returns details of an account rate-limits
func (*HTTPClient) GetRaydiumCLMMPools ¶
func (h *HTTPClient) GetRaydiumCLMMPools(ctx context.Context, request *pb.GetRaydiumCLMMPoolsRequest) (*pb.GetRaydiumCLMMPoolsResponse, error)
GetRaydiumCLMMPools returns the CLMM pools on Raydium
func (*HTTPClient) GetRaydiumCLMMQuotes ¶
func (h *HTTPClient) GetRaydiumCLMMQuotes(ctx context.Context, request *pb.GetRaydiumCLMMQuotesRequest) (*pb.GetRaydiumCLMMQuotesResponse, error)
GetRaydiumCLMMQuotes returns the CLMM quotes on Raydium
func (*HTTPClient) GetRaydiumPoolReserve ¶
func (h *HTTPClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
GetRaydiumPoolReserve returns pools details for a given set of pairs or addresses on Raydium
func (*HTTPClient) GetRaydiumPools ¶
func (h *HTTPClient) GetRaydiumPools(ctx context.Context, _ *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
GetRaydiumPools returns pools on Raydium
func (*HTTPClient) GetRaydiumPrices ¶
func (h *HTTPClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
GetRaydiumPrices returns the USDC price of requested tokens on Raydium
func (*HTTPClient) GetRaydiumQuotes ¶
func (h *HTTPClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
GetRaydiumQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium
func (*HTTPClient) GetRaydiumQuotesCPMM ¶
func (h *HTTPClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
GetRaydiumQuotesCPMM returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium CPMM Pools
func (*HTTPClient) GetRecentBlockHash ¶
func (h *HTTPClient) GetRecentBlockHash(ctx context.Context) (*pb.GetRecentBlockHashResponse, error)
GetRecentBlockHash returns recent block hash.
func (*HTTPClient) GetRecentBlockHashV2 ¶
func (h *HTTPClient) GetRecentBlockHashV2(ctx context.Context, offset uint64) (*pb.GetRecentBlockHashResponseV2, error)
GetRecentBlockHash returns recent block hash, supports optional offset.
func (*HTTPClient) GetTickers ¶
func (h *HTTPClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
GetTickers returns the requested market tickets. Set market to "" for all markets.
func (*HTTPClient) GetTickersV2 ¶
func (h *HTTPClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
GetTickersV2 returns the requested market tickets. Set market to "" for all markets.
func (*HTTPClient) GetTokenAccounts ¶
func (h *HTTPClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
func (*HTTPClient) GetTrades ¶
func (h *HTTPClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
GetTrades returns the requested market's currently executing trades. Set limit to 0 for all trades.
func (*HTTPClient) GetTransaction ¶
func (h *HTTPClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
GetTransaction returns details of a recent transaction
func (*HTTPClient) GetUnsettled ¶
func (h *HTTPClient) GetUnsettled(ctx context.Context, market string, owner string, project pb.Project) (*pb.GetUnsettledResponse, error)
GetUnsettled returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*HTTPClient) GetUnsettledV2 ¶
func (h *HTTPClient) GetUnsettledV2(ctx context.Context, market string, owner string) (*pb.GetUnsettledResponse, error)
GetUnsettledV2 returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*HTTPClient) PostCancelAll ¶
func (h *HTTPClient) PostCancelAll(ctx context.Context, market, owner string, openOrdersAddresses []string, project pb.Project) (*pb.PostCancelAllResponse, error)
func (*HTTPClient) PostCancelByClientOrderID ¶
func (h *HTTPClient) PostCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, ) (*pb.PostCancelOrderResponse, error)
PostCancelByClientOrderID builds a Serum cancel order by client ID.
func (*HTTPClient) PostCancelOrder ¶
func (h *HTTPClient) PostCancelOrder( ctx context.Context, orderID string, side pb.Side, owner, market, openOrders string, project pb.Project, ) (*pb.PostCancelOrderResponse, error)
PostCancelOrder builds a Serum cancel order.
func (*HTTPClient) PostCancelOrderV2 ¶
func (h *HTTPClient) PostCancelOrderV2( ctx context.Context, orderID string, clientOrderID uint64, side string, owner, market, openOrders string, ) (*pb.PostCancelOrderResponseV2, error)
PostCancelOrderV2 builds a Serum cancel order.
func (*HTTPClient) PostJupiterRouteSwap ¶
func (h *HTTPClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
PostJupiterRouteSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*HTTPClient) PostJupiterSwap ¶
func (h *HTTPClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
PostJupiterSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*HTTPClient) PostJupiterSwapInstructions ¶
func (h *HTTPClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
PostJupiterSwapInstructions returns a list of instructions that can be used to construct a custom transaction for a jupiter swap
func (*HTTPClient) PostOrder ¶
func (h *HTTPClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrder returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*HTTPClient) PostOrderV2 ¶
func (h *HTTPClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrderV2 returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*HTTPClient) PostOrderV2WithPriorityFee ¶
func (h *HTTPClient) PostOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, computeLimit uint32, computePrice uint64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrderV2WithPriorityFee returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*HTTPClient) PostPumpFunSwap ¶
func (h *HTTPClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
PostPumpFunSwap returns a partially signed transaction(s) for submitting a swap request on Pumpdotfun platform
func (*HTTPClient) PostRaydiumCLMMRouteSwap ¶
func (h *HTTPClient) PostRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
PostRaydiumCLMMRouteSwap returns a partially signed transaction(s) for submitting a route swap request on Raydium
func (*HTTPClient) PostRaydiumCLMMSwap ¶
func (h *HTTPClient) PostRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
PostRaydiumCLMMSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*HTTPClient) PostRaydiumCPMMSwap ¶
func (h *HTTPClient) PostRaydiumCPMMSwap(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
PostRaydiumSwapCPMM returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*HTTPClient) PostRaydiumRouteSwap ¶
func (h *HTTPClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
PostRaydiumRouteSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*HTTPClient) PostRaydiumSwap ¶
func (h *HTTPClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
PostRaydiumSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*HTTPClient) PostRaydiumSwapInstructions ¶
func (h *HTTPClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
PostRaydiumSwapInstructions returns a list of instructions that can be used to construct a custom transaction for a raydium swap
func (*HTTPClient) PostReplaceByClientOrderID ¶
func (h *HTTPClient) PostReplaceByClientOrderID(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*HTTPClient) PostReplaceOrder ¶
func (h *HTTPClient) PostReplaceOrder(ctx context.Context, orderID, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*HTTPClient) PostReplaceOrderV2 ¶
func (h *HTTPClient) PostReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
func (*HTTPClient) PostRouteTradeSwap ¶
func (h *HTTPClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
PostRouteTradeSwap returns a partially signed transaction(s) for submitting a route swap request
func (*HTTPClient) PostSettle ¶
func (h *HTTPClient) PostSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project) (*pb.PostSettleResponse, error)
PostSettle returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*HTTPClient) PostSettleV2 ¶
func (h *HTTPClient) PostSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string) (*pb.PostSettleResponse, error)
PostSettleV2 returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*HTTPClient) PostSubmit ¶
func (h *HTTPClient) PostSubmit(ctx context.Context, txBase64 string, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (*pb.PostSubmitResponse, error)
PostSubmit posts the transaction string to the Solana network.
func (*HTTPClient) PostSubmitBatch ¶
func (h *HTTPClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatch posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*HTTPClient) PostSubmitBatchV2 ¶
func (h *HTTPClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatchV2 posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*HTTPClient) PostSubmitV2 ¶
func (h *HTTPClient) PostSubmitV2(ctx context.Context, txBase64 string, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (*pb.PostSubmitResponse, error)
PostSubmitV2 posts the transaction string to the Solana network.
func (*HTTPClient) PostTradeSwap ¶
func (h *HTTPClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, inAmount, slippage float64, project pb.Project) (*pb.TradeSwapResponse, error)
PostTradeSwap returns a partially signed transaction for submitting a swap request
func (*HTTPClient) SignAndSubmit ¶
func (h *HTTPClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (string, error)
SignAndSubmit signs the given transaction and submits it.
func (*HTTPClient) SignAndSubmitBatch ¶
func (h *HTTPClient) SignAndSubmitBatch(ctx context.Context, transactions []*pb.TransactionMessage, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SignAndSubmitBatch signs the given transactions and submits them.
func (*HTTPClient) SubmitCancelAll ¶
func (h *HTTPClient) SubmitCancelAll(ctx context.Context, market, owner string, openOrders []string, project pb.Project, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
func (*HTTPClient) SubmitCancelByClientOrderID ¶
func (h *HTTPClient) SubmitCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, skipPreFlight bool, ) (string, error)
SubmitCancelByClientOrderID builds a Serum cancel order by client ID, signs and submits it to the network.
func (*HTTPClient) SubmitCancelOrder ¶
func (h *HTTPClient) SubmitCancelOrder( ctx context.Context, orderID string, side pb.Side, owner, market, openOrders string, project pb.Project, skipPreFlight bool, ) (string, error)
SubmitCancelOrder builds a Serum cancel order, signs and submits it to the network.
func (*HTTPClient) SubmitCancelOrderV2 ¶
func (h *HTTPClient) SubmitCancelOrderV2( ctx context.Context, orderID string, clientOrderID uint64, side string, owner, market, openOrders string, opts SubmitOpts, ) (*pb.PostSubmitBatchResponse, error)
SubmitCancelOrderV2 builds a Serum cancel order, signs and submits it to the network.
func (*HTTPClient) SubmitJupiterRouteSwap ¶
func (h *HTTPClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterRouteSwap builds a Jupiter RouteSwap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitJupiterSwap ¶
func (h *HTTPClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwap builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitJupiterSwapInstructions ¶
func (h *HTTPClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwapInstructions builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitOrder ¶
func (h *HTTPClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (string, error)
SubmitOrder builds a Serum market order, signs it, and submits to the network.
func (*HTTPClient) SubmitOrderV2 ¶
func (h *HTTPClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (string, error)
SubmitOrderV2 builds a Serum market order, signs it, and submits to the network.
func (*HTTPClient) SubmitOrderV2WithPriorityFee ¶
func (h *HTTPClient) SubmitOrderV2WithPriorityFee(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, computeLimit uint32, computePrice uint64, opts PostOrderOpts) (string, error)
SubmitOrderV2WithPriorityFee builds a Serum market order, signs it, and submits to the network.
func (*HTTPClient) SubmitPostPumpFunSwap ¶
func (h *HTTPClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
SubmitPostPumpFunSwap builds a pumpfun Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumCLMMRouteSwap ¶
func (h *HTTPClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMRouteSwap builds a Raydium CLMM RouteSwap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumCLMMSwap ¶
func (h *HTTPClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMSwap builds a Raydium CLMM Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumRouteSwap ¶
func (h *HTTPClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumRouteSwap builds a Raydium RouteSwap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumSwap ¶
func (h *HTTPClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwap builds a Raydium Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumSwapCPMM ¶
func (h *HTTPClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
SubmitRaydiumSwapCPMM builds a Raydium Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitRaydiumSwapInstructions ¶
func (h *HTTPClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwapInstructions builds a Raydium Swap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitReplaceByClientOrderID ¶
func (*HTTPClient) SubmitReplaceOrder ¶
func (*HTTPClient) SubmitReplaceOrderV2 ¶
func (h *HTTPClient) SubmitReplaceOrderV2(ctx context.Context, orderID, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (string, error)
func (*HTTPClient) SubmitRouteTradeSwap ¶
func (h *HTTPClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRouteTradeSwap builds a RouteTradeSwap transaction then signs it, and submits to the network.
func (*HTTPClient) SubmitSettle ¶
func (h *HTTPClient) SubmitSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project, skipPreflight bool) (string, error)
SubmitSettle builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*HTTPClient) SubmitSettleV2 ¶
func (h *HTTPClient) SubmitSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, skipPreflight bool) (string, error)
SubmitSettleV2 builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*HTTPClient) SubmitTradeSwap ¶
func (h *HTTPClient) SubmitTradeSwap(ctx context.Context, owner, inToken, outToken string, inAmount, slippage float64, project pb.Project, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitTradeSwap builds a TradeSwap transaction then signs it, and submits to the network.
type PostOrderOpts ¶
type RPCOpts ¶
type RPCOpts struct { Endpoint string DisableAuth bool UseTLS bool PrivateKey *solana.PrivateKey AuthHeader string CacheBlockHash bool BlockHashTtl time.Duration }
func DefaultRPCOpts ¶
type SubmitOpts ¶
type SubmitOpts struct { SubmitStrategy pb.SubmitStrategy SkipPreFlight *bool }
type WSClient ¶
type WSClient struct { pb.UnimplementedApiServer // contains filtered or unexported fields }
func NewWSClientDevnet ¶
NewWSClientDevnet connects to Devnet Trader API
func NewWSClientLocal ¶
NewWSClientLocal connects to local Trader API
func NewWSClientPumpNY ¶
NewWSClientPumpNY connects to Mainnet NY Pump Trader API
func NewWSClientTestnet ¶
NewWSClientTestnet connects to Testnet Trader API
func NewWSClientWithOpts ¶
NewWSClientWithOpts connects to custom Trader API
func (*WSClient) GetAccountBalance ¶
func (w *WSClient) GetAccountBalance(ctx context.Context, owner string) (*pb.GetAccountBalanceResponse, error)
GetAccountBalance returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*WSClient) GetBlockStream ¶
func (w *WSClient) GetBlockStream(ctx context.Context) (connections.Streamer[*pb.GetBlockStreamResponse], error)
GetBlockStream subscribes to a stream for getting recent blocks.
func (*WSClient) GetBundleTipStream ¶
func (w *WSClient) GetBundleTipStream(ctx context.Context) (connections.Streamer[*pb.GetBundleTipResponse], error)
GetBundleTipStream subscribes to a stream of recent bundle tip percentiles
func (*WSClient) GetJupiterPrices ¶
func (w *WSClient) GetJupiterPrices(ctx context.Context, request *pb.GetJupiterPricesRequest) (*pb.GetJupiterPricesResponse, error)
GetJupiterPrices returns the USDC price of requested tokens on Jupiter
func (*WSClient) GetJupiterQuotes ¶
func (w *WSClient) GetJupiterQuotes(ctx context.Context, request *pb.GetJupiterQuotesRequest) (*pb.GetJupiterQuotesResponse, error)
GetJupiterQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Jupiter
func (*WSClient) GetMarketDepth ¶
func (w *WSClient) GetMarketDepth(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetMarketDepthResponse, error)
GetMarketDepth returns the requested market's coalesced price data (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*WSClient) GetMarketDepthV2 ¶
func (w *WSClient) GetMarketDepthV2(ctx context.Context, market string, limit uint32) (*pb.GetMarketDepthResponseV2, error)
GetMarketDepthV2 returns the requested market's coalesced price data (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*WSClient) GetMarketDepthsStream ¶
func (w *WSClient) GetMarketDepthsStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetMarketDepthsStreamResponse], error)
GetMarketDepthsStream subscribes to a stream for changes to the requested market data updates (e.g. asks and bids. Set limit to 0 for all bids/ asks).
func (*WSClient) GetMarkets ¶
GetMarkets returns the list of all available named markets
func (*WSClient) GetMarketsV2 ¶
GetMarketsV2 returns the list of all available named markets
func (*WSClient) GetNewRaydiumPoolsByTransactionStream ¶
func (w *WSClient) GetNewRaydiumPoolsByTransactionStream(ctx context.Context) (connections.Streamer[*pb.GetNewRaydiumPoolsByTransactionResponse], error)
GetNewRaydiumPoolsByTranasctionStream subscribes to a stream for new Raydium Pools when they are created with some more detailed info compared to the standard straem, while sacrificing some speed
func (*WSClient) GetNewRaydiumPoolsStream ¶
func (w *WSClient) GetNewRaydiumPoolsStream(ctx context.Context, includeCPMM bool) (connections.Streamer[*pb.GetNewRaydiumPoolsResponse], error)
GetNewRaydiumPoolsStream subscribes to a stream for new Raydium Pools when they are created with option to include Raydium cpmm amm.
func (*WSClient) GetOpenOrders ¶
func (w *WSClient) GetOpenOrders(ctx context.Context, market string, owner string, openOrdersAddress string, project pb.Project) (*pb.GetOpenOrdersResponse, error)
GetOpenOrders returns all open orders by owner address and market
func (*WSClient) GetOpenOrdersV2 ¶
func (w *WSClient) GetOpenOrdersV2(ctx context.Context, market string, owner string, openOrdersAddress string, orderID string, clientOrderID uint64) (*pb.GetOpenOrdersResponse, error)
GetOpenOrdersV2 returns all open orders by owner address and market
func (*WSClient) GetOrderByID ¶
func (w *WSClient) GetOrderByID(ctx context.Context, in *pb.GetOrderByIDRequest) (*pb.GetOrderByIDResponse, error)
GetOrderByID returns an order by id
func (*WSClient) GetOrderStatusStream ¶
func (w *WSClient) GetOrderStatusStream(ctx context.Context, market, ownerAddress string, project pb.Project) (connections.Streamer[*pb.GetOrderStatusStreamResponse], error)
GetOrderStatusStream subscribes to a stream that shows updates to the owner's orders
func (*WSClient) GetOrderbook ¶
func (w *WSClient) GetOrderbook(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetOrderbookResponse, error)
GetOrderbook returns the requested market's orderbook (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*WSClient) GetOrderbookV2 ¶
func (w *WSClient) GetOrderbookV2(ctx context.Context, market string, limit uint32) (*pb.GetOrderbookResponseV2, error)
GetOrderbookV2 returns the requested market's orderbook (e.g. asks and bids). Set limit to 0 for all bids / asks.
func (*WSClient) GetOrderbooksStream ¶
func (w *WSClient) GetOrderbooksStream(ctx context.Context, markets []string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetOrderbooksStreamResponse], error)
GetOrderbooksStream subscribes to a stream for changes to the requested market updates (e.g. asks and bids. Set limit to 0 for all bids/ asks).
func (*WSClient) GetPoolReservesStream ¶
func (w *WSClient) GetPoolReservesStream(ctx context.Context, request *pb.GetPoolReservesStreamRequest) (connections.Streamer[*pb.GetPoolReservesStreamResponse], error)
GetPoolReservesStream subscribes to a stream for getting recent quotes of tokens of interest.
func (*WSClient) GetPools ¶
func (w *WSClient) GetPools(ctx context.Context, projects []pb.Project) (*pb.GetPoolsResponse, error)
GetPools returns pools for given projects.
func (*WSClient) GetPricesStream ¶
func (w *WSClient) GetPricesStream(ctx context.Context, projects []pb.Project, tokens []string) (connections.Streamer[*pb.GetPricesStreamResponse], error)
GetPricesStream subscribes to a stream for getting recent quotes of tokens of interest.
func (*WSClient) GetPriorityFee ¶
func (w *WSClient) GetPriorityFee(ctx context.Context, project pb.Project, percentile *float64) (*pb.GetPriorityFeeResponse, error)
GetPriorityFee returns an suggested priority fee based on a given percentile
func (*WSClient) GetPriorityFeeByProgram ¶
func (w *WSClient) GetPriorityFeeByProgram(ctx context.Context, programs []string) (*pb.GetPriorityFeeByProgramResponse, error)
GetPriorityFeeByProgram returns priority fees based on a given list of programs
func (*WSClient) GetPriorityFeeStream ¶
func (w *WSClient) GetPriorityFeeStream(ctx context.Context, project pb.Project, percentile *float64) (connections.Streamer[*pb.GetPriorityFeeResponse], error)
GetPriorityFeeStream subscribes to a stream for getting a recent priority fee estimate based on a percentile.
func (*WSClient) GetPumpFunNewTokensStream ¶
func (w *WSClient) GetPumpFunNewTokensStream(ctx context.Context, req *pb.GetPumpFunNewTokensStreamRequest) (connections.Streamer[*pb.GetPumpFunNewTokensStreamResponse], error)
GetPumpFunNewTokensStream subscribes to a stream for pumpdotfun's new pool events
func (*WSClient) GetPumpFunQuotes ¶
func (w *WSClient) GetPumpFunQuotes(ctx context.Context, request *pb.GetPumpFunQuotesRequest) (*pb.GetPumpFunQuotesResponse, error)
GetPumpFunQuotes returns the best quotes for swapping a token on PumpFun platform
func (*WSClient) GetPumpFunSwapsStream ¶
func (w *WSClient) GetPumpFunSwapsStream(ctx context.Context, req *pb.GetPumpFunSwapsStreamRequest) (connections.Streamer[*pb.GetPumpFunSwapsStreamResponse], error)
GetPumpFunSwapsStream subscribes to a stream for swap events related to a set of pumpdotfun tokens
func (*WSClient) GetQuotes ¶
func (w *WSClient) GetQuotes(ctx context.Context, inToken, outToken string, inAmount, slippage float64, limit int32, projects []pb.Project) (*pb.GetQuotesResponse, error)
GetQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it
func (*WSClient) GetQuotesStream ¶
func (w *WSClient) GetQuotesStream(ctx context.Context, projects []pb.Project, tokenPairs []*pb.TokenPair) (connections.Streamer[*pb.GetQuotesStreamResponse], error)
GetQuotesStream subscribes to a stream for getting recent quotes of tokens of interest.
func (*WSClient) GetRateLimit ¶
func (w *WSClient) GetRateLimit(ctx context.Context, request *pb.GetRateLimitRequest) (*pb.GetRateLimitResponse, error)
GetRateLimit returns details of an account rate-limits
func (*WSClient) GetRaydiumCLMMPools ¶
func (w *WSClient) GetRaydiumCLMMPools(ctx context.Context, request *pb.GetRaydiumCLMMPoolsRequest) (*pb.GetRaydiumCLMMPoolsResponse, error)
GetRaydiumCLMMPools returns the CLMM pools on Raydium
func (*WSClient) GetRaydiumCLMMQuotes ¶
func (w *WSClient) GetRaydiumCLMMQuotes(ctx context.Context, request *pb.GetRaydiumCLMMQuotesRequest) (*pb.GetRaydiumCLMMQuotesResponse, error)
GetRaydiumCLMMQuotes returns the CLMM quotes on Raydium
func (*WSClient) GetRaydiumPoolReserve ¶
func (w *WSClient) GetRaydiumPoolReserve(ctx context.Context, req *pb.GetRaydiumPoolReserveRequest) (*pb.GetRaydiumPoolReserveResponse, error)
GetRaydiumPoolReserve returns pools details for a given set of pairs or addresses on Raydium
func (*WSClient) GetRaydiumPools ¶
func (w *WSClient) GetRaydiumPools(ctx context.Context, request *pb.GetRaydiumPoolsRequest) (*pb.GetRaydiumPoolsResponse, error)
GetRaydiumPools returns pools on Raydium
func (*WSClient) GetRaydiumPrices ¶
func (w *WSClient) GetRaydiumPrices(ctx context.Context, request *pb.GetRaydiumPricesRequest) (*pb.GetRaydiumPricesResponse, error)
GetRaydiumPrices returns the USDC price of requested tokens on Raydium
func (*WSClient) GetRaydiumQuotes ¶
func (w *WSClient) GetRaydiumQuotes(ctx context.Context, request *pb.GetRaydiumQuotesRequest) (*pb.GetRaydiumQuotesResponse, error)
GetRaydiumQuotes returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium
func (*WSClient) GetRaydiumQuotesCPMM ¶
func (w *WSClient) GetRaydiumQuotesCPMM(ctx context.Context, request *pb.GetRaydiumCPMMQuotesRequest) (*pb.GetRaydiumCPMMQuotesResponse, error)
GetRaydiumQuotesCPMM returns the possible amount(s) of outToken for an inToken and the route to achieve it on Raydium CPMM pool
func (*WSClient) GetRecentBlockHash ¶
func (w *WSClient) GetRecentBlockHash(ctx context.Context, request *pb.GetRecentBlockHashRequest) (*pb.GetRecentBlockHashResponse, error)
GetRecentBlockHash returns recent block hash.
func (*WSClient) GetRecentBlockHashStream ¶
func (w *WSClient) GetRecentBlockHashStream(ctx context.Context) (connections.Streamer[*pb.GetRecentBlockHashResponse], error)
GetRecentBlockHashStream subscribes to a stream for getting recent block hash.
func (*WSClient) GetRecentBlockHashV2 ¶
func (w *WSClient) GetRecentBlockHashV2(ctx context.Context, request *pb.GetRecentBlockHashRequestV2) (*pb.GetRecentBlockHashResponseV2, error)
GetRecentBlockHash returns recent block hash, supports optional offset.
func (*WSClient) GetSwapsStream ¶
func (w *WSClient) GetSwapsStream( ctx context.Context, projects []pb.Project, markets []string, includeFailed bool, ) (connections.Streamer[*pb.GetSwapsStreamResponse], error)
GetSwapsStream subscribes to a stream for getting recent swaps on projects & markets of interest.
func (*WSClient) GetTickers ¶
func (w *WSClient) GetTickers(ctx context.Context, market string, project pb.Project) (*pb.GetTickersResponse, error)
GetTickers returns the requested market tickets. Set market to "" for all markets.
func (*WSClient) GetTickersStream ¶
func (w *WSClient) GetTickersStream(ctx context.Context, request *pb.GetTickersStreamRequest) (connections.Streamer[*pb.GetTickersStreamResponse], error)
GetTickersStream subscribes to a stream for getting recent tickers of specified markets.
func (*WSClient) GetTickersV2 ¶
func (w *WSClient) GetTickersV2(ctx context.Context, market string) (*pb.GetTickersResponseV2, error)
GetTickersV2 returns the requested market tickets. Set market to "" for all markets.
func (*WSClient) GetTokenAccounts ¶
func (w *WSClient) GetTokenAccounts(ctx context.Context, req *pb.GetTokenAccountsRequest) (*pb.GetTokenAccountsResponse, error)
GetTokenAccounts returns all tokens associated with the owner address
func (*WSClient) GetTrades ¶
func (w *WSClient) GetTrades(ctx context.Context, market string, limit uint32, project pb.Project) (*pb.GetTradesResponse, error)
GetTrades returns the requested market's currently executing trades. Set limit to 0 for all trades.
func (*WSClient) GetTradesStream ¶
func (w *WSClient) GetTradesStream(ctx context.Context, market string, limit uint32, project pb.Project) (connections.Streamer[*pb.GetTradesStreamResponse], error)
GetTradesStream subscribes to a stream for trades as they execute. Set limit to 0 for all trades.
func (*WSClient) GetTransaction ¶
func (w *WSClient) GetTransaction(ctx context.Context, request *pb.GetTransactionRequest) (*pb.GetTransactionResponse, error)
GetTransaction returns details of a recent transaction
func (*WSClient) GetUnsettled ¶
func (w *WSClient) GetUnsettled(ctx context.Context, market string, ownerAddress string, project pb.Project) (*pb.GetUnsettledResponse, error)
GetUnsettled returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*WSClient) GetUnsettledV2 ¶
func (w *WSClient) GetUnsettledV2(ctx context.Context, market string, ownerAddress string) (*pb.GetUnsettledResponse, error)
GetUnsettledV2 returns all OpenOrders accounts for a given market with the amounts of unsettled funds
func (*WSClient) PostCancelAll ¶
func (*WSClient) PostCancelByClientOrderID ¶
func (w *WSClient) PostCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, ) (*pb.PostCancelOrderResponse, error)
PostCancelByClientOrderID builds a Serum cancel order by client ID.
func (*WSClient) PostCancelOrder ¶
func (w *WSClient) PostCancelOrder(ctx context.Context, request *pb.PostCancelOrderRequest) (*pb.PostCancelOrderResponse, error)
PostCancelOrder builds a Serum cancel order.
func (*WSClient) PostCancelOrderV2 ¶
func (w *WSClient) PostCancelOrderV2(ctx context.Context, request *pb.PostCancelOrderRequestV2) (*pb.PostCancelOrderResponseV2, error)
PostCancelOrderV2 builds a Serum cancel order.
func (*WSClient) PostJupiterRouteSwap ¶
func (w *WSClient) PostJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest) (*pb.PostJupiterRouteSwapResponse, error)
PostJupiterRouteSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*WSClient) PostJupiterSwap ¶
func (w *WSClient) PostJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest) (*pb.PostJupiterSwapResponse, error)
PostJupiterSwap returns a partially signed transaction(s) for submitting a swap request on Jupiter
func (*WSClient) PostJupiterSwapInstructions ¶
func (w *WSClient) PostJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest) (*pb.PostJupiterSwapInstructionsResponse, error)
PostJupiterSwapInstructions returns instructions to build a transaction and submit it on jupiter
func (*WSClient) PostOrder ¶
func (w *WSClient) PostOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrder returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*WSClient) PostOrderV2 ¶
func (w *WSClient) PostOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (*pb.PostOrderResponse, error)
PostOrderV2 returns a partially signed transaction for placing a Serum market order. Typically, you want to use SubmitOrder instead of this.
func (*WSClient) PostPumpFunSwap ¶
func (w *WSClient) PostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (*pb.PostPumpFunSwapResponse, error)
PostPumpFunSwap returns a partially signed transaction(s) for submitting a swap request on Pumpdotfun platform
func (*WSClient) PostRaydiumCLMMRouteSwap ¶
func (w *WSClient) PostRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
PostRaydiumCLMMRouteSwap returns a partially signed transaction(s) for submitting a route swap request on Raydium
func (*WSClient) PostRaydiumCLMMSwap ¶
func (w *WSClient) PostRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
PostRaydiumCLMMSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*WSClient) PostRaydiumRouteSwap ¶
func (w *WSClient) PostRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest) (*pb.PostRaydiumRouteSwapResponse, error)
PostRaydiumRouteSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*WSClient) PostRaydiumSwap ¶
func (w *WSClient) PostRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest) (*pb.PostRaydiumSwapResponse, error)
PostRaydiumSwap returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*WSClient) PostRaydiumSwapCPMM ¶
func (w *WSClient) PostRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (*pb.PostRaydiumCPMMSwapResponse, error)
PostRaydiumSwapCPMM returns a partially signed transaction(s) for submitting a swap request on Raydium
func (*WSClient) PostRaydiumSwapInstructions ¶
func (w *WSClient) PostRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest) (*pb.PostRaydiumSwapInstructionsResponse, error)
PostRaydiumSwapInstructions returns instructions to build a transaction and submit it on raydium
func (*WSClient) PostReplaceByClientOrderID ¶
func (*WSClient) PostReplaceOrder ¶
func (*WSClient) PostReplaceOrderV2 ¶
func (*WSClient) PostRouteTradeSwap ¶
func (w *WSClient) PostRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest) (*pb.TradeSwapResponse, error)
PostRouteTradeSwap returns a partially signed transaction(s) for submitting a swap request
func (*WSClient) PostSettle ¶
func (w *WSClient) PostSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project) (*pb.PostSettleResponse, error)
PostSettle returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*WSClient) PostSettleV2 ¶
func (w *WSClient) PostSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string) (*pb.PostSettleResponse, error)
PostSettleV2 returns a partially signed transaction for settling market funds. Typically, you want to use SubmitSettle instead of this.
func (*WSClient) PostSubmit ¶
func (w *WSClient) PostSubmit(ctx context.Context, txBase64 string, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (*pb.PostSubmitResponse, error)
PostSubmit posts the transaction string to the Solana network.
func (*WSClient) PostSubmitBatch ¶
func (w *WSClient) PostSubmitBatch(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatch posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*WSClient) PostSubmitBatchV2 ¶
func (w *WSClient) PostSubmitBatchV2(ctx context.Context, request *pb.PostSubmitBatchRequest) (*pb.PostSubmitBatchResponse, error)
PostSubmitBatchV2 posts a bundle of transactions string based on a specific SubmitStrategy to the Solana network.
func (*WSClient) PostSubmitV2 ¶
func (w *WSClient) PostSubmitV2(ctx context.Context, txBase64 string, skipPreFlight bool, useBundle bool, useStakedRPCs bool) (*pb.PostSubmitResponse, error)
PostSubmitV2 posts the transaction string to the Solana network.
func (*WSClient) PostTradeSwap ¶
func (w *WSClient) PostTradeSwap(ctx context.Context, ownerAddress, inToken, outToken string, inAmount, slippage float64, projectStr string) (*pb.TradeSwapResponse, error)
PostTradeSwap returns a partially signed transaction for submitting a swap request
func (*WSClient) PostTradeSwapWithPriorityFee ¶
func (w *WSClient) PostTradeSwapWithPriorityFee(ctx context.Context, ownerAddress, inToken, outToken string, inAmount, slippage float64, computeLimit uint32, computePrice uint64, projectStr string) (*pb.TradeSwapResponse, error)
PostTradeSwapWithPriorityFee returns a partially signed transaction for submitting a swap request with computeLimit and computePrice
func (*WSClient) RecentBlockHash ¶
func (*WSClient) SignAndSubmit ¶
func (w *WSClient) SignAndSubmit(ctx context.Context, tx *pb.TransactionMessage, skipPreFlight bool, frontRunningProtection bool, useStakedRPCs bool) (string, error)
SignAndSubmit signs the given transaction and submits it.
func (*WSClient) SignAndSubmitBatch ¶
func (w *WSClient) SignAndSubmitBatch(ctx context.Context, transactions []*pb.TransactionMessage, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SignAndSubmitBatch signs the given transactions and submits them.
func (*WSClient) SubmitCancelAll ¶
func (*WSClient) SubmitCancelByClientOrderID ¶
func (w *WSClient) SubmitCancelByClientOrderID( ctx context.Context, clientOrderID uint64, owner, market, openOrders string, project pb.Project, skipPreFlight bool, ) (string, error)
SubmitCancelByClientOrderID builds a Serum cancel order by client ID, signs and submits it to the network.
func (*WSClient) SubmitCancelOrder ¶
func (w *WSClient) SubmitCancelOrder(ctx context.Context, request *pb.PostCancelOrderRequest, skipPreFlight bool) (string, error)
SubmitCancelOrder builds a Serum cancel order, signs and submits it to the network.
func (*WSClient) SubmitCancelOrderV2 ¶
func (w *WSClient) SubmitCancelOrderV2(ctx context.Context, request *pb.PostCancelOrderRequestV2, skipPreFlight bool) (*pb.PostSubmitBatchResponse, error)
SubmitCancelOrderV2 builds a Serum cancel order, signs and submits it to the network.
func (*WSClient) SubmitJupiterRouteSwap ¶
func (w *WSClient) SubmitJupiterRouteSwap(ctx context.Context, request *pb.PostJupiterRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterRouteSwap builds a Jupiter RouteSwap transaction then signs it, and submits to the network.
func (*WSClient) SubmitJupiterSwap ¶
func (w *WSClient) SubmitJupiterSwap(ctx context.Context, request *pb.PostJupiterSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwap builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitJupiterSwapInstructions ¶
func (w *WSClient) SubmitJupiterSwapInstructions(ctx context.Context, request *pb.PostJupiterSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitJupiterSwapInstructions builds a Jupiter Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitOrder ¶
func (w *WSClient) SubmitOrder(ctx context.Context, owner, payer, market string, side pb.Side, types []common.OrderType, amount, price float64, project pb.Project, opts PostOrderOpts) (string, error)
SubmitOrder builds a Serum market order, signs it, and submits to the network.
func (*WSClient) SubmitOrderV2 ¶
func (w *WSClient) SubmitOrderV2(ctx context.Context, owner, payer, market string, side string, orderType string, amount, price float64, opts PostOrderOpts) (string, error)
SubmitOrderV2 builds a Serum market order, signs it, and submits to the network.
func (*WSClient) SubmitPostPumpFunSwap ¶
func (w *WSClient) SubmitPostPumpFunSwap(ctx context.Context, request *pb.PostPumpFunSwapRequest) (string, error)
SubmitPostPumpFunSwap builds a pumpfun Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumCLMMRouteSwap ¶
func (w *WSClient) SubmitRaydiumCLMMRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMRouteSwap builds a Raydium RouteSwap transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumCLMMSwap ¶
func (w *WSClient) SubmitRaydiumCLMMSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumCLMMSwap builds a Raydium Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumRouteSwap ¶
func (w *WSClient) SubmitRaydiumRouteSwap(ctx context.Context, request *pb.PostRaydiumRouteSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumRouteSwap builds a Raydium RouteSwap transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumSwap ¶
func (w *WSClient) SubmitRaydiumSwap(ctx context.Context, request *pb.PostRaydiumSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwap builds a Raydium Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumSwapCPMM ¶
func (w *WSClient) SubmitRaydiumSwapCPMM(ctx context.Context, request *pb.PostRaydiumCPMMSwapRequest) (string, error)
SubmitRaydiumSwapCPMM builds a Raydium Swap CPMM transaction then signs it, and submits to the network.
func (*WSClient) SubmitRaydiumSwapInstructions ¶
func (w *WSClient) SubmitRaydiumSwapInstructions(ctx context.Context, request *pb.PostRaydiumSwapInstructionsRequest, useBundle bool, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRaydiumSwapInstructions builds a Raydium Swap transaction then signs it, and submits to the network.
func (*WSClient) SubmitReplaceByClientOrderID ¶
func (*WSClient) SubmitReplaceOrder ¶
func (*WSClient) SubmitReplaceOrderV2 ¶
func (*WSClient) SubmitRouteTradeSwap ¶
func (w *WSClient) SubmitRouteTradeSwap(ctx context.Context, request *pb.RouteTradeSwapRequest, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitRouteTradeSwap builds a RouteTradeSwap transaction then signs it, and submits to the network.
func (*WSClient) SubmitSettle ¶
func (w *WSClient) SubmitSettle(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, project pb.Project, skipPreflight bool) (string, error)
SubmitSettle builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*WSClient) SubmitSettleV2 ¶
func (w *WSClient) SubmitSettleV2(ctx context.Context, owner, market, baseTokenWallet, quoteTokenWallet, openOrdersAccount string, skipPreflight bool) (string, error)
SubmitSettleV2 builds a market SubmitSettle transaction, signs it, and submits to the network.
func (*WSClient) SubmitTradeSwap ¶
func (w *WSClient) SubmitTradeSwap(ctx context.Context, owner, inToken, outToken string, inAmount, slippage float64, project string, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitTradeSwap builds a TradeSwap transaction then signs it, and submits to the network.
func (*WSClient) SubmitTradeSwapWithPriorityFee ¶
func (w *WSClient) SubmitTradeSwapWithPriorityFee(ctx context.Context, owner, inToken, outToken string, inAmount, slippage float64, project string, computeLimit uint32, computePrice uint64, opts SubmitOpts) (*pb.PostSubmitBatchResponse, error)
SubmitTradeSwapWithPriorityFee builds a TradeSwap transaction then signs it, and submits to the network.