Skip to content

Client

cyhole.jupiter.client

JupiterClient

JupiterClient(
    interaction: Jupiter, headers: Any | None = None
)

Bases: APIClient

Client used for synchronous API calls for Jupiter interaction.

Source code in src/cyhole/jupiter/client.py
35
36
37
def __init__(self, interaction: Jupiter, headers: Any | None = None) -> None:
    super().__init__(interaction, headers)
    self._interaction: Jupiter = self._interaction

get_price

get_price(
    address: list[str],
    extra_info: bool = False,
    vs_address: str | None = None,
) -> GetPriceResponse

Call the Jupiter's GET Price API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_price.

Source code in src/cyhole/jupiter/client.py
39
40
41
42
43
44
def get_price(self, address: list[str], extra_info: bool = False, vs_address: str | None = None) -> GetPriceResponse:
    """
        Call the Jupiter's GET **[Price](https://station.jup.ag/docs/utility/price-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_price`][cyhole.jupiter.interaction.Jupiter._get_price].
    """
    return self._interaction._get_price(True, address, extra_info, vs_address)

get_quote

get_quote(input: GetQuoteInput) -> GetQuoteResponse

Call the Jupiter's GET Quote API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_quote.

Source code in src/cyhole/jupiter/client.py
46
47
48
49
50
51
def get_quote(self, input: GetQuoteInput) -> GetQuoteResponse:
    """
        Call the Jupiter's GET **[Quote](https://station.jup.ag/api-v6/get-quote)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote`][cyhole.jupiter.interaction.Jupiter._get_quote].
    """
    return self._interaction._get_quote(True, input)

get_quote_tokens

get_quote_tokens() -> GetQuoteTokensResponse

Call the Jupiter's GET Quote Tokens API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_quote_tokens.

Source code in src/cyhole/jupiter/client.py
53
54
55
56
57
58
def get_quote_tokens(self) -> GetQuoteTokensResponse:
    """
        Call the Jupiter's GET **[Quote Tokens](https://station.jup.ag/api-v6/get-tokens)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote_tokens`][cyhole.jupiter.interaction.Jupiter._get_quote_tokens].
    """
    return self._interaction._get_quote_tokens(True)

get_quote_program_id_label

get_quote_program_id_label() -> (
    GetQuoteProgramIdLabelResponse
)

Call the Jupiter's GET Quote Program ID to Label API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_quote_program_id_label.

Source code in src/cyhole/jupiter/client.py
60
61
62
63
64
65
def get_quote_program_id_label(self) -> GetQuoteProgramIdLabelResponse:
    """
        Call the Jupiter's GET **[Quote Program ID to Label](https://station.jup.ag/api-v6/get-program-id-to-label)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote_program_id_label`][cyhole.jupiter.interaction.Jupiter._get_quote_program_id_label].
    """
    return self._interaction._get_quote_program_id_label(True)

post_swap

post_swap(body: PostSwapBody) -> PostSwapResponse

Call the Jupiter's POST Swap API endpoint for synchronous logic. All the API endopint details are available on Jupiter._post_swap.

Source code in src/cyhole/jupiter/client.py
67
68
69
70
71
72
def post_swap(self, body: PostSwapBody) -> PostSwapResponse:
    """
        Call the Jupiter's POST **[Swap](https://station.jup.ag/api-v6/post-swap)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._post_swap`][cyhole.jupiter.interaction.Jupiter._post_swap].
    """
    return self._interaction._post_swap(True, body)

get_token_info

get_token_info(address: str) -> GetTokenInfoResponse

Call the Jupiter's GET Token API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_token_info.

Source code in src/cyhole/jupiter/client.py
74
75
76
77
78
79
def get_token_info(self, address: str) -> GetTokenInfoResponse:
    """
        Call the Jupiter's GET **[Token](https://station.jup.ag/docs/api/token-information)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_info`][cyhole.jupiter.interaction.Jupiter._get_token_info].
    """
    return self._interaction._get_token_info(True, address)

get_token_market_mints

get_token_market_mints(
    address: str,
) -> GetTokenMarketMintsResponse

Call the Jupiter's GET Token Market Mints API for synchronous logic. All the API endopint details are available on Jupiter._get_token_market_mints.

Source code in src/cyhole/jupiter/client.py
81
82
83
84
85
86
def get_token_market_mints(self, address: str) -> GetTokenMarketMintsResponse:
    """
        Call the Jupiter's GET **[Token Market Mints](https://station.jup.ag/docs/api/mints-in-market)** API for synchronous logic.
        All the API endopint details are available on [`Jupiter._get_token_market_mints`][cyhole.jupiter.interaction.Jupiter._get_token_market_mints].
    """
    return self._interaction._get_token_market_mints(True, address)

get_token_new

get_token_new(
    limit: int = 10, offset: int | None = None
) -> GetTokenNewResponse

Call the Jupiter's GET New Token API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_token_new.

Source code in src/cyhole/jupiter/client.py
88
89
90
91
92
93
def get_token_new(self, limit: int = 10, offset: int | None = None) -> GetTokenNewResponse:
    """
        Call the Jupiter's GET **[New Token](https://station.jup.ag/docs/api/new)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_new`][cyhole.jupiter.interaction.Jupiter._get_token_new].
    """
    return self._interaction._get_token_new(True, limit, offset)

get_token_tagged

get_token_tagged(
    tag: str | JupiterTokenTagType,
) -> GetTokenTaggedResponse

Call the Jupiter's GET [Tagged Token]https://station.jup.ag/docs/api/tagged) API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_token_tagged.

Source code in src/cyhole/jupiter/client.py
 95
 96
 97
 98
 99
100
def get_token_tagged(self, tag: str | JupiterTokenTagType) -> GetTokenTaggedResponse:
    """
        Call the Jupiter's GET **[Tagged Token]https://station.jup.ag/docs/api/tagged)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_tagged`][cyhole.jupiter.interaction.Jupiter._get_token_tagged].
    """
    return self._interaction._get_token_tagged(True, tag)

post_limit_order_create

post_limit_order_create(
    body: PostLimitOrderCreateBody,
) -> PostLimitOrderCreateResponse

Call the Jupiter's POST Limit Order - Create API endpoint for synchronous logic. All the API endopint details are available on Jupiter._post_limit_order_create.

Source code in src/cyhole/jupiter/client.py
102
103
104
105
106
107
def post_limit_order_create(self, body: PostLimitOrderCreateBody) -> PostLimitOrderCreateResponse:
    """
        Call the Jupiter's POST **[Limit Order - Create](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._post_limit_order_create`][cyhole.jupiter.interaction.Jupiter._post_limit_order_create].
    """
    return self._interaction._post_limit_order_create(True, body)

post_limit_order_cancel

post_limit_order_cancel(
    body: PostLimitOrderCancelBody,
) -> PostLimitOrderCancelResponse

Call the Jupiter's POST Limit Order - Cancel API endpoint for synchronous logic. All the API endopint details are available on Jupiter._post_limit_order_cancel.

Source code in src/cyhole/jupiter/client.py
109
110
111
112
113
114
def post_limit_order_cancel(self, body: PostLimitOrderCancelBody) -> PostLimitOrderCancelResponse:
    """
        Call the Jupiter's POST **[Limit Order - Cancel](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._post_limit_order_cancel`][cyhole.jupiter.interaction.Jupiter._post_limit_order_cancel].
    """
    return self._interaction._post_limit_order_cancel(True, body)

get_limit_order_open

get_limit_order_open(
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
) -> GetLimitOrderOpenResponse

Call the Jupiter's GET Limit Order - Open API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_limit_order_open.

Source code in src/cyhole/jupiter/client.py
116
117
118
119
120
121
122
123
124
125
126
def get_limit_order_open(
        self,
        wallet: str | None = None,
        input_token: str | None = None,
        output_token: str | None = None
    ) -> GetLimitOrderOpenResponse:
    """
        Call the Jupiter's GET **[Limit Order - Open](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_open`][cyhole.jupiter.interaction.Jupiter._get_limit_order_open].
    """
    return self._interaction._get_limit_order_open(True, wallet, input_token, output_token)

get_limit_order_history

get_limit_order_history(
    wallet: str,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None,
) -> GetLimitOrderHistoryResponse

Call the Jupiter's GET Limit Order - History API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_limit_order_history.

Source code in src/cyhole/jupiter/client.py
128
129
130
131
132
133
134
135
136
137
138
139
def get_limit_order_history(
    self,
    wallet: str,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None
) -> GetLimitOrderHistoryResponse:
    """
        Call the Jupiter's GET **[Limit Order - History](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_history`][cyhole.jupiter.interaction.Jupiter._get_limit_order_history].
    """
    return self._interaction._get_limit_order_history(True, wallet, cursor, skip, take)

get_limit_order_trade_history

get_limit_order_trade_history(
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None,
) -> GetLimitOrderTradeHistoryResponse

Call the Jupiter's GET Limit Order - Trade History API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_limit_order_trade_history.

Source code in src/cyhole/jupiter/client.py
141
142
143
144
145
146
147
148
149
150
151
152
153
154
def get_limit_order_trade_history(
    self,
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None
) -> GetLimitOrderTradeHistoryResponse:
    """
        Call the Jupiter's GET **[Limit Order - Trade History](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_trade_history`][cyhole.jupiter.interaction.Jupiter._get_limit_order_trade_history].
    """
    return self._interaction._get_limit_order_trade_history(True, wallet, input_token, output_token, cursor, skip, take)

JupiterAsyncClient

JupiterAsyncClient(
    interaction: Jupiter, headers: Any | None = None
)

Bases: AsyncAPIClient

Client used for asynchronous API calls for Jupiter interaction.

Source code in src/cyhole/jupiter/client.py
161
162
163
def __init__(self, interaction: Jupiter, headers: Any | None = None) -> None:
    super().__init__(interaction, headers)
    self._interaction: Jupiter = self._interaction

get_price async

get_price(
    address: list[str],
    extra_info: bool = False,
    vs_address: str | None = None,
) -> GetPriceResponse

Call the Jupiter's GET Price API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_price.

Source code in src/cyhole/jupiter/client.py
165
166
167
168
169
170
async def get_price(self, address: list[str], extra_info: bool = False, vs_address: str | None = None) -> GetPriceResponse:
    """
        Call the Jupiter's GET **[Price](https://station.jup.ag/docs/utility/price-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_price`][cyhole.jupiter.interaction.Jupiter._get_price].
    """
    return await self._interaction._get_price(False, address, extra_info, vs_address)

get_quote async

get_quote(input: GetQuoteInput) -> GetQuoteResponse

Call the Jupiter's GET Quote API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_quote.

Source code in src/cyhole/jupiter/client.py
172
173
174
175
176
177
async def get_quote(self, input: GetQuoteInput) -> GetQuoteResponse:
    """
        Call the Jupiter's GET **[Quote](https://station.jup.ag/api-v6/get-quote)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote`][cyhole.jupiter.interaction.Jupiter._get_quote].
    """
    return await self._interaction._get_quote(False, input)

get_quote_tokens async

get_quote_tokens() -> GetQuoteTokensResponse

Call the Jupiter's GET Quote Tokens API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_quote_tokens.

Source code in src/cyhole/jupiter/client.py
179
180
181
182
183
184
async def get_quote_tokens(self) -> GetQuoteTokensResponse:
    """
        Call the Jupiter's GET **[Quote Tokens](https://station.jup.ag/api-v6/get-tokens)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote_tokens`][cyhole.jupiter.interaction.Jupiter._get_quote_tokens].
    """
    return await self._interaction._get_quote_tokens(False)

get_quote_program_id_label async

get_quote_program_id_label() -> (
    GetQuoteProgramIdLabelResponse
)

Call the Jupiter's GET Quote Program ID to Label API endpoint for synchronous logic. All the API endopint details are available on Jupiter._get_quote_program_id_label.

Source code in src/cyhole/jupiter/client.py
186
187
188
189
190
191
async def get_quote_program_id_label(self) -> GetQuoteProgramIdLabelResponse:
    """
        Call the Jupiter's GET **[Quote Program ID to Label](https://station.jup.ag/api-v6/get-program-id-to-label)** API endpoint for synchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote_program_id_label`][cyhole.jupiter.interaction.Jupiter._get_quote_program_id_label].
    """
    return await self._interaction._get_quote_program_id_label(False)

post_swap async

post_swap(body: PostSwapBody) -> PostSwapResponse

Call the Jupiter's POST Swap API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_quote_program_id_label.

Source code in src/cyhole/jupiter/client.py
193
194
195
196
197
198
async def post_swap(self, body: PostSwapBody) -> PostSwapResponse:
    """
        Call the Jupiter's POST **[Swap](https://station.jup.ag/api-v6/post-swap)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_quote_program_id_label`][cyhole.jupiter.interaction.Jupiter._get_quote_program_id_label].
    """
    return await self._interaction._post_swap(False, body)

get_token_info async

get_token_info(address: str) -> GetTokenInfoResponse

Call the Jupiter's GET Token API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_token_info.

Source code in src/cyhole/jupiter/client.py
200
201
202
203
204
205
async def get_token_info(self, address: str) -> GetTokenInfoResponse:
    """
        Call the Jupiter's GET **[Token](https://station.jup.ag/docs/api/token-information)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_info`][cyhole.jupiter.interaction.Jupiter._get_token_info].
    """
    return await self._interaction._get_token_info(False, address)

get_token_market_mints async

get_token_market_mints(
    address: str,
) -> GetTokenMarketMintsResponse

Call the Jupiter's GET Token Market Mints API for asynchronous logic. All the API endopint details are available on Jupiter._get_token_market_mints.

Source code in src/cyhole/jupiter/client.py
207
208
209
210
211
212
async def get_token_market_mints(self, address: str) -> GetTokenMarketMintsResponse:
    """
        Call the Jupiter's GET **[Token Market Mints](https://station.jup.ag/docs/api/mints-in-market)** API for asynchronous logic.
        All the API endopint details are available on [`Jupiter._get_token_market_mints`][cyhole.jupiter.interaction.Jupiter._get_token_market_mints].
    """
    return await self._interaction._get_token_market_mints(False, address)

get_token_tagged async

get_token_tagged(
    tag: str | JupiterTokenTagType,
) -> GetTokenTaggedResponse

Call the Jupiter's GET [Tagged Token]https://station.jup.ag/docs/api/tagged) API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_token_tagged.

Source code in src/cyhole/jupiter/client.py
214
215
216
217
218
219
async def get_token_tagged(self, tag: str | JupiterTokenTagType) -> GetTokenTaggedResponse:
    """
        Call the Jupiter's GET **[Tagged Token]https://station.jup.ag/docs/api/tagged)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_tagged`][cyhole.jupiter.interaction.Jupiter._get_token_tagged].
    """
    return await self._interaction._get_token_tagged(False, tag)

get_token_new async

get_token_new(
    limit: int = 10, offset: int | None = None
) -> GetTokenNewResponse

Call the Jupiter's GET New Token API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_token_new.

Source code in src/cyhole/jupiter/client.py
221
222
223
224
225
226
async def get_token_new(self, limit: int = 10, offset: int | None = None) -> GetTokenNewResponse:
    """
        Call the Jupiter's GET **[New Token](https://station.jup.ag/docs/api/new)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_token_new`][cyhole.jupiter.interaction.Jupiter._get_token_new].
    """
    return await self._interaction._get_token_new(False, limit, offset)

post_limit_order_create async

post_limit_order_create(
    body: PostLimitOrderCreateBody,
) -> PostLimitOrderCreateResponse

Call the Jupiter's POST Limit Order - Create API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._post_limit_order_create.

Source code in src/cyhole/jupiter/client.py
228
229
230
231
232
233
async def post_limit_order_create(self, body: PostLimitOrderCreateBody) -> PostLimitOrderCreateResponse:
    """
        Call the Jupiter's POST **[Limit Order - Create](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._post_limit_order_create`][cyhole.jupiter.interaction.Jupiter._post_limit_order_create].
    """
    return await self._interaction._post_limit_order_create(False, body)

post_limit_order_cancel async

post_limit_order_cancel(
    body: PostLimitOrderCancelBody,
) -> PostLimitOrderCancelResponse

Call the Jupiter's POST Limit Order - Cancel API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._post_limit_order_cancel.

Source code in src/cyhole/jupiter/client.py
235
236
237
238
239
240
async def post_limit_order_cancel(self, body: PostLimitOrderCancelBody) -> PostLimitOrderCancelResponse:
    """
        Call the Jupiter's POST **[Limit Order - Cancel](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._post_limit_order_cancel`][cyhole.jupiter.interaction.Jupiter._post_limit_order_cancel].
    """
    return await self._interaction._post_limit_order_cancel(False, body)

get_limit_order_open async

get_limit_order_open(
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
) -> GetLimitOrderOpenResponse

Call the Jupiter's GET Limit Order - Open API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_limit_order_open.

Source code in src/cyhole/jupiter/client.py
242
243
244
245
246
247
248
249
250
251
252
async def get_limit_order_open(
        self,
        wallet: str | None = None,
        input_token: str | None = None,
        output_token: str | None = None
    ) -> GetLimitOrderOpenResponse:
    """
        Call the Jupiter's GET **[Limit Order - Open](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_open`][cyhole.jupiter.interaction.Jupiter._get_limit_order_open].
    """
    return await self._interaction._get_limit_order_open(False, wallet, input_token, output_token)

get_limit_order_history async

get_limit_order_history(
    wallet: str,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None,
) -> GetLimitOrderHistoryResponse

Call the Jupiter's GET Limit Order - History API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_limit_order_history.

Source code in src/cyhole/jupiter/client.py
254
255
256
257
258
259
260
261
262
263
264
265
async def get_limit_order_history(
    self,
    wallet: str,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None
) -> GetLimitOrderHistoryResponse:
    """
        Call the Jupiter's GET **[Limit Order - History](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_history`][cyhole.jupiter.interaction.Jupiter._get_limit_order_history].
    """
    return await self._interaction._get_limit_order_history(False, wallet, cursor, skip, take)

get_limit_order_trade_history async

get_limit_order_trade_history(
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None,
) -> GetLimitOrderTradeHistoryResponse

Call the Jupiter's GET Limit Order - Trade History API endpoint for asynchronous logic. All the API endopint details are available on Jupiter._get_limit_order_trade_history.

Source code in src/cyhole/jupiter/client.py
267
268
269
270
271
272
273
274
275
276
277
278
279
280
async def get_limit_order_trade_history(
    self,
    wallet: str | None = None,
    input_token: str | None = None,
    output_token: str | None = None,
    cursor: int | None = None,
    skip: int | None = None,
    take: int | None = None
) -> GetLimitOrderTradeHistoryResponse:
    """
        Call the Jupiter's GET **[Limit Order - Trade History](https://station.jup.ag/docs/limit-order/limit-order-api)** API endpoint for asynchronous logic. 
        All the API endopint details are available on [`Jupiter._get_limit_order_trade_history`][cyhole.jupiter.interaction.Jupiter._get_limit_order_trade_history].
    """
    return await self._interaction._get_limit_order_trade_history(False, wallet, input_token, output_token, cursor, skip, take)