Documentation
¶
Index ¶
- type Client
- func (c *Client) AddTrackedWalletsV1(ctx context.Context, req *apiv1.AddTrackedWalletRequest) (*apiv1.TrackedWallet, error)
- func (c *Client) AddWalletsListV1(ctx context.Context, req *apiv1.AddWalletsListRequest) (*apiv1.WalletList, error)
- func (c *Client) DeleteWalletsListV1(ctx context.Context, listID int64, deleteWallets bool) error
- func (c *Client) GetAggregatedTokenPnLV1(ctx context.Context, req *apiv1.AggregatedTokenPnLRequest) (*apiv1.AggregatedTokenPnLResponse, error)
- func (c *Client) GetAllWalletsListV1(ctx context.Context, req *apiv1.GetAllWalletsListsRequest) (*apiv1.GetAllWalletsListsResponse, error)
- func (c *Client) GetFeedV1(ctx context.Context, req *apiv1.FeedRequest) (*apiv1.FeedResponse, error)
- func (c *Client) GetNftsPnlV1(ctx context.Context, req *apiv1.NftsPnLRequest) (*apiv1.NftsPnLResponse, error)
- func (c *Client) GetRelatedWalletsV1(ctx context.Context, req *apiv1.RelatedWalletsRequest) (*apiv1.RelatedWalletsResponse, error)
- func (c *Client) GetTelegramBotsV1(ctx context.Context) (*apiv1.GetTelegramBotsResponse, error)
- func (c *Client) GetTokenBalanceV1(ctx context.Context, req *apiv1.TokenBalanceRequest) (*apiv1.TokenBalanceResponse, error)
- func (c *Client) GetTokenMetadataV1(ctx context.Context, req *apiv1.TokenMetadataRequest) (*apiv1.TokenMetadataResponse, error)
- func (c *Client) GetTokenPriceV1(ctx context.Context, req *apiv1.TokenPriceRequest) (*apiv1.TokenPriceResponse, error)
- func (c *Client) GetTokenStatsV1(ctx context.Context, req *apiv1.TokenStatsRequest) (*apiv1.TokenStatsResponse, error)
- func (c *Client) GetTokensPnlV1(ctx context.Context, req *apiv1.TokensPnLRequest) (*apiv1.TokensPnLResponse, error)
- func (c *Client) GetTrackedWalletsV1(ctx context.Context, req *apiv1.GetTrackedWalletsRequest) (*apiv1.GetTrackedWalletsResponse, error)
- func (c *Client) GetTradingStatsV1(ctx context.Context, req *apiv1.TradingStatsRequest) (*apiv1.TradingStatsResponse, error)
- func (c *Client) GetUserWalletsListsV1(ctx context.Context) ([]apiv1.WalletList, error)
- func (c *Client) GetWalletByAddressV1(ctx context.Context, wallet string) (*apiv1.TrackedWallet, error)
- func (c *Client) GetWalletPortfolioV1(ctx context.Context, wallet string) (*apiv1.WalletPortfolioResponse, error)
- func (c *Client) GetWalletPortfolioV2(ctx context.Context, req *apiv1.WalletPortfolioV2Request) (*apiv1.WalletPortfolioV2Response, error)
- func (c *Client) GetWalletTagsV1(ctx context.Context, req *apiv1.GetWalletTagsRequest) (*apiv1.GetWalletTagsResponse, error)deprecated
- func (c *Client) GetWalletsByTagV1(ctx context.Context, req *apiv1.GetWalletsByTagRequest) (*apiv1.GetWalletsByTagResponse, error)
- func (c *Client) GetWalletsTagsV1(ctx context.Context, req *apiv1.GetWalletsTagsRequest) ([]apiv1.WalletTags, error)
- func (c *Client) NewWebsocketConnection(ctx context.Context, opts ...WebsocketOption) (*WebsocketClient, error)
- func (c *Client) RemoveTrackedWalletsV1(ctx context.Context, req *apiv1.RemoveTrackedWalletsRequest) error
- func (c *Client) ToggleFollowWalletsListV1(ctx context.Context, listID int64) (*apiv1.ToggleFollowWalletsListResponce, error)
- func (c *Client) UpdateTrackedWalletV1(ctx context.Context, walletID int64, req *apiv1.UpdateTrackedWalletRequest) (*apiv1.TrackedWallet, error)
- func (c *Client) UpdateTrackedWalletV2(ctx context.Context, wallet string, req *apiv1.UpdateTrackedWalletV2Request) (*apiv1.TrackedWallet, error)
- func (c *Client) UpdateWalletsListV1(ctx context.Context, req *apiv1.UpdateWalletsListRequest) (*apiv1.WalletList, error)
- type ClientOption
- type WebsocketClient
- type WebsocketOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(apiKey string, opts ...ClientOption) *Client
func (*Client) AddTrackedWalletsV1 ¶ added in v0.1.6
func (c *Client) AddTrackedWalletsV1(ctx context.Context, req *apiv1.AddTrackedWalletRequest) (*apiv1.TrackedWallet, error)
AddTrackedWalletsV1 adds a new wallet to tracking with optional notification settings.
Cost: 5 credits per request
func (*Client) AddWalletsListV1 ¶ added in v0.1.6
func (c *Client) AddWalletsListV1(ctx context.Context, req *apiv1.AddWalletsListRequest) (*apiv1.WalletList, error)
AddWalletsListV1 creates a new wallet list.
Cost: 5 credits per request
func (*Client) DeleteWalletsListV1 ¶ added in v0.1.6
DeleteWalletsListV1 deletes a wallet list. If deleteWallets is true, all wallets in the list will also be deleted. If deleteWallets is false, only the list itself is deleted, wallets are preserved.
Cost: 5 credits per request
func (*Client) GetAggregatedTokenPnLV1 ¶
func (c *Client) GetAggregatedTokenPnLV1(ctx context.Context, req *apiv1.AggregatedTokenPnLRequest) (*apiv1.AggregatedTokenPnLResponse, error)
GetAggregatedTokenPnLV1 retrieves aggregated token statistics and performance metrics for a wallet.
Cost: 20 credits per request
func (*Client) GetAllWalletsListV1 ¶ added in v0.1.6
func (c *Client) GetAllWalletsListV1(ctx context.Context, req *apiv1.GetAllWalletsListsRequest) (*apiv1.GetAllWalletsListsResponse, error)
GetAllWalletsListV1 retrieves all public wallet lists with optional filtering and sorting.
Cost: 5 credits per request
func (*Client) GetFeedV1 ¶
func (c *Client) GetFeedV1(ctx context.Context, req *apiv1.FeedRequest) (*apiv1.FeedResponse, error)
GetFeedV1 retrieves the transaction feed for a wallet or list.
Cost: 5 credits per request (3 credits when filtered by wallet). WARNING: Setting IncludeMarketCap to true doubles the cost (10 or 6 credits).
Example:
// Get feed with new MaxUSD filter and market cap data
maxUSD := 100000.0
includeMarketCap := true
feed, err := client.GetFeedV1(ctx, &apiv1.FeedRequest{
ListID: apiv1.ToRef(int64(123)),
MaxUSD: &maxUSD,
IncludeMarketCap: &includeMarketCap, // WARNING: Doubles credit cost
})
func (*Client) GetNftsPnlV1 ¶
func (c *Client) GetNftsPnlV1(ctx context.Context, req *apiv1.NftsPnLRequest) (*apiv1.NftsPnLResponse, error)
GetNftsPnlV1 retrieves NFT profit and loss data for a wallet.
Cost: 5 credits per request
func (*Client) GetRelatedWalletsV1 ¶
func (c *Client) GetRelatedWalletsV1(ctx context.Context, req *apiv1.RelatedWalletsRequest) (*apiv1.RelatedWalletsResponse, error)
GetRelatedWalletsV1 finds wallets that have transacted with the specified wallet.
Cost: 10 credits per request
https://developer.cielo.finance/reference/getrelatedwalletsl
func (*Client) GetTelegramBotsV1 ¶ added in v0.2.0
GetTelegramBotsV1 retrieves the list of available Telegram bots for notifications. Only returns bots where available=true.
Cost: 5 credits per request
func (*Client) GetTokenBalanceV1 ¶ added in v0.2.0
func (c *Client) GetTokenBalanceV1(ctx context.Context, req *apiv1.TokenBalanceRequest) (*apiv1.TokenBalanceResponse, error)
GetTokenBalanceV1 retrieves the balance of a specific token for a given wallet, including the token's current price and total USD value.
Supported chains: solana, ethereum, base, hyperevm Cost: 3 credits per request
func (*Client) GetTokenMetadataV1 ¶ added in v0.2.0
func (c *Client) GetTokenMetadataV1(ctx context.Context, req *apiv1.TokenMetadataRequest) (*apiv1.TokenMetadataResponse, error)
GetTokenMetadataV1 retrieves detailed metadata for a specified token including name, symbol, decimals, creation details, social links, and supply information.
Supported chains: solana, ethereum, base, hyperevm Cost: 1 credit per request
func (*Client) GetTokenPriceV1 ¶ added in v0.2.0
func (c *Client) GetTokenPriceV1(ctx context.Context, req *apiv1.TokenPriceRequest) (*apiv1.TokenPriceResponse, error)
GetTokenPriceV1 retrieves the current price in USD for a specified token.
Supported chains: solana, ethereum, base, hyperevm Cost: 1 credit per request
func (*Client) GetTokenStatsV1 ¶ added in v0.2.0
func (c *Client) GetTokenStatsV1(ctx context.Context, req *apiv1.TokenStatsRequest) (*apiv1.TokenStatsResponse, error)
GetTokenStatsV1 retrieves comprehensive statistics for a specified token including price changes, volume metrics, market cap, and unique trader counts across multiple time periods (5m, 1h, 6h, 24h).
Supported chains: solana, ethereum, base, hyperevm Cost: 3 credits per request
func (*Client) GetTokensPnlV1 ¶
func (c *Client) GetTokensPnlV1(ctx context.Context, req *apiv1.TokensPnLRequest) (*apiv1.TokensPnLResponse, error)
GetTokensPnlV1 retrieves token profit and loss data for a wallet.
Cost: 5 credits per request
Example:
// Get only active positions (balance > 0)
pnl, err := client.GetTokensPnlV1(ctx, &apiv1.TokensPnLRequest{
Wallet: "0x1234...",
ActivePositionsOnly: apiv1.ToRef(true),
})
func (*Client) GetTrackedWalletsV1 ¶ added in v0.1.6
func (c *Client) GetTrackedWalletsV1(ctx context.Context, req *apiv1.GetTrackedWalletsRequest) (*apiv1.GetTrackedWalletsResponse, error)
GetTrackedWalletsV1 retrieves all wallets being tracked by the user, with optional filtering by list.
Cost: 5 credits per request
func (*Client) GetTradingStatsV1 ¶ added in v0.2.0
func (c *Client) GetTradingStatsV1(ctx context.Context, req *apiv1.TradingStatsRequest) (*apiv1.TradingStatsResponse, error)
GetTradingStatsV1 retrieves detailed performance statistics for a wallet's trading activity, including PnL, ROI, win rate, and trading behavior insights.
Note: This endpoint may return 202 Accepted if data is not ready yet. In that case, retry the request after 10 seconds.
Cost: 30 credits per request
Example:
stats, err := client.GetTradingStatsV1(ctx, &apiv1.TradingStatsRequest{
Wallet: "0x1234...",
Chain: apiv1.ToRef(chains.Ethereum),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Total PnL: $%.2f | Win Rate: %.1f%%\n",
stats.TotalPnL, stats.WinRate*100)
func (*Client) GetUserWalletsListsV1 ¶ added in v0.1.6
GetUserWalletsListsV1 retrieves all wallet lists owned by the authenticated user.
Cost: 5 credits per request
func (*Client) GetWalletByAddressV1 ¶ added in v0.2.0
func (c *Client) GetWalletByAddressV1(ctx context.Context, wallet string) (*apiv1.TrackedWallet, error)
GetWalletByAddressV1 retrieves a tracked wallet by its wallet address. Returns 404 if the wallet is not being tracked.
Cost: 5 credits per request
https://developer.cielo.finance/reference/getWalletByAddress
func (*Client) GetWalletPortfolioV1 ¶ added in v0.2.0
func (c *Client) GetWalletPortfolioV1(ctx context.Context, wallet string) (*apiv1.WalletPortfolioResponse, error)
GetWalletPortfolioV1 retrieves the portfolio of a wallet including token balances and USD values. For Solana wallets, the response also includes the native SOL balance. Portfolio assets with a total_usd_value of zero are excluded from the response.
Supported chains: Solana, EVM (Ethereum, Base, HyperEVM) Cost: 20 credits per request
Example:
portfolio, err := client.GetWalletPortfolioV1(ctx, "0x1234...")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Total USD: $%.2f\n", portfolio.TotalUSD)
for _, token := range portfolio.Tokens {
fmt.Printf("%s: %.2f (%s)\n", token.Symbol, token.Balance, token.TotalUSDValue)
}
https://developer.cielo.finance/reference/getWalletPortfolio
func (*Client) GetWalletPortfolioV2 ¶ added in v0.2.0
func (c *Client) GetWalletPortfolioV2(ctx context.Context, req *apiv1.WalletPortfolioV2Request) (*apiv1.WalletPortfolioV2Response, error)
GetWalletPortfolioV2 retrieves the portfolio of one or multiple wallets with optional token filtering. Supports comma-separated wallet addresses for aggregated portfolio view. Each token in the response includes a wallet_address field indicating which wallet holds it.
When a token parameter is provided (Solana wallets only):
- Only supported for Solana wallets - returns error for EVM/Sui wallets
- Returns only the specified token's balance information
- Response format changes to a single token object instead of portfolio object
- Returns 404 if the token is not found in the wallet
When multiple wallets are provided:
- Token filtering is not supported and will return an error
- Portfolios are fetched in parallel for better performance
- Tokens are sorted by total_usd_value in descending order
- Total USD and chain distributions are aggregated across all wallets
Supported chains: Solana, EVM (Ethereum, Base, HyperEVM), Sui Cost: 20 credits per wallet
Example (aggregated multi-wallet portfolio):
portfolio, err := client.GetWalletPortfolioV2(ctx, &apiv1.WalletPortfolioV2Request{
Wallets: []string{"0x1111...", "0x2222...", "0x3333..."},
})
// Cost: 60 credits (20 per wallet)
https://developer.cielo.finance/reference/getWalletPortfolioV2
func (*Client) GetWalletTagsV1
deprecated
func (c *Client) GetWalletTagsV1(ctx context.Context, req *apiv1.GetWalletTagsRequest) (*apiv1.GetWalletTagsResponse, error)
GetWalletTagsV1 retrieves tags for a single wallet.
Deprecated: This endpoint is deprecated by the Cielo Finance API. Use GetWalletsTagsV1 instead, which supports batch operations for up to 50 wallets.
Cost: 5 credits per request
func (*Client) GetWalletsByTagV1 ¶ added in v0.1.2
func (c *Client) GetWalletsByTagV1(ctx context.Context, req *apiv1.GetWalletsByTagRequest) (*apiv1.GetWalletsByTagResponse, error)
GetWalletsByTagV1 retrieves all wallets that have a specific tag.
Cost: 10 credits per request
func (*Client) GetWalletsTagsV1 ¶ added in v0.1.6
func (c *Client) GetWalletsTagsV1(ctx context.Context, req *apiv1.GetWalletsTagsRequest) ([]apiv1.WalletTags, error)
GetWalletsTagsV1 retrieves tags for multiple wallets in a single request (up to 50 wallets).
Cost: 5 credits per request
func (*Client) NewWebsocketConnection ¶ added in v0.1.5
func (c *Client) NewWebsocketConnection(ctx context.Context, opts ...WebsocketOption) (*WebsocketClient, error)
func (*Client) RemoveTrackedWalletsV1 ¶ added in v0.1.6
func (c *Client) RemoveTrackedWalletsV1(ctx context.Context, req *apiv1.RemoveTrackedWalletsRequest) error
RemoveTrackedWalletsV1 removes one or more wallets from tracking by their IDs.
Cost: 5 credits per request
https://developer.cielo.finance/reference/removetrackedwallets
func (*Client) ToggleFollowWalletsListV1 ¶ added in v0.1.6
func (c *Client) ToggleFollowWalletsListV1(ctx context.Context, listID int64) (*apiv1.ToggleFollowWalletsListResponce, error)
ToggleFollowWalletsListV1 toggles the follow status of a public wallet list.
Cost: 5 credits per request
func (*Client) UpdateTrackedWalletV1 ¶ added in v0.2.0
func (c *Client) UpdateTrackedWalletV1(ctx context.Context, walletID int64, req *apiv1.UpdateTrackedWalletRequest) (*apiv1.TrackedWallet, error)
UpdateTrackedWalletV1 updates a tracked wallet by its wallet ID.
Cost: 5 credits per request
https://developer.cielo.finance/reference/updateTrackedWalletV1
func (*Client) UpdateTrackedWalletV2 ¶ added in v0.2.0
func (c *Client) UpdateTrackedWalletV2(ctx context.Context, wallet string, req *apiv1.UpdateTrackedWalletV2Request) (*apiv1.TrackedWallet, error)
UpdateTrackedWalletV2 updates a tracked wallet by its wallet address with support for partial updates. All fields are optional and only provided fields will be updated.
Cost: 5 credits per request
Example:
// Update only notification settings (partial update)
updated, err := client.UpdateTrackedWalletV2(ctx, "0x1234...", &apiv1.UpdateTrackedWalletV2Request{
MinUSD: apiv1.ToRef(1000.0),
TelegramBot: apiv1.ToRef("my_bot"),
DiscordChannel: apiv1.ToRef("webhook_url"),
})
https://developer.cielo.finance/reference/updateTrackedWalletV2
func (*Client) UpdateWalletsListV1 ¶ added in v0.1.6
func (c *Client) UpdateWalletsListV1(ctx context.Context, req *apiv1.UpdateWalletsListRequest) (*apiv1.WalletList, error)
UpdateWalletsListV1 updates an existing wallet list's properties.
Cost: 5 credits per request
type ClientOption ¶ added in v0.2.0
type ClientOption func(*Client)
ClientOption is a function that configures a Client
func WithBaseURL ¶ added in v0.2.0
func WithBaseURL(baseURL string) ClientOption
WithBaseURL sets a custom base URL (useful for testing)
func WithHTTPClient ¶ added in v0.2.0
func WithHTTPClient(client *http.Client) ClientOption
WithHTTPClient sets a custom HTTP client
type WebsocketClient ¶ added in v0.1.5
type WebsocketClient struct {
// contains filtered or unexported fields
}
func (*WebsocketClient) Close ¶ added in v0.1.5
func (ws *WebsocketClient) Close()
func (*WebsocketClient) RunListener ¶ added in v0.1.5
func (*WebsocketClient) SendCommand ¶ added in v0.1.5
func (ws *WebsocketClient) SendCommand(cmd apiv1.WebSocketsCommand) error
type WebsocketOption ¶ added in v0.1.5
type WebsocketOption func(*WebsocketClient)
func WithCloseHandler ¶ added in v0.1.5
func WithCloseHandler(h func(code int, text string) error) WebsocketOption
func WithDeadline ¶ added in v0.1.5
func WithDeadline(t time.Time) WebsocketOption
func WithPingHandler ¶ added in v0.1.5
func WithPingHandler(h func(appData string) error) WebsocketOption
func WithPongHandler ¶ added in v0.1.5
func WithPongHandler(h func(appData string) error) WebsocketOption
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
complete_workflow
command
|
|
|
portfolio
command
|
|
|
tracked_wallets
command
|
|