Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.2"
".": "0.1.0-alpha.3"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 76
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/coingecko%2Fcoingecko-927a6b126ae13cbcde1cb8818c390ce13f838d7802e51bd9ceb1920893c46470.yml
openapi_spec_hash: 0c29bd602dbc3fb5a226320a3fd0f9d9
config_hash: 1cc0bc621ce857d41500f93783460439
configured_endpoints: 77
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/coingecko%2Fcoingecko-672da434b7c16835742e7051aa49aa7c953646ea384ead8b64fcbfd611c9dc13.yml
openapi_spec_hash: 8c8c984aa692011f8b7b5f62d9ad3211
config_hash: ee0fcee03e9f9b77015be66024d42405
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.3 (2025-05-29)

Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/coingecko/coingecko-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

### Features

* **api:** update via SDK Studio ([0812f21](https://github.com/coingecko/coingecko-python/commit/0812f2163205be4e48486f201ab979b78593e9a1))

## 0.1.0-alpha.2 (2025-05-28)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/coingecko/coingecko-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
Expand Down
14 changes: 13 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ from coingecko_python.types import (
Methods:

- <code title="get /exchanges">client.exchanges.<a href="./src/coingecko_python/resources/exchanges/exchanges.py">get</a>(\*\*<a href="src/coingecko_python/types/exchange_get_params.py">params</a>) -> <a href="./src/coingecko_python/types/exchange_get_response.py">ExchangeGetResponse</a></code>
- <code title="get /exchanges/{id}">client.exchanges.<a href="./src/coingecko_python/resources/exchanges/exchanges.py">get_id</a>(id) -> <a href="./src/coingecko_python/types/exchange_get_id_response.py">ExchangeGetIDResponse</a></code>
- <code title="get /exchanges/{id}">client.exchanges.<a href="./src/coingecko_python/resources/exchanges/exchanges.py">get_id</a>(id, \*\*<a href="src/coingecko_python/types/exchange_get_id_params.py">params</a>) -> <a href="./src/coingecko_python/types/exchange_get_id_response.py">ExchangeGetIDResponse</a></code>
- <code title="get /exchanges/list">client.exchanges.<a href="./src/coingecko_python/resources/exchanges/exchanges.py">get_list</a>(\*\*<a href="src/coingecko_python/types/exchange_get_list_params.py">params</a>) -> <a href="./src/coingecko_python/types/exchange_get_list_response.py">ExchangeGetListResponse</a></code>

## Tickers
Expand Down Expand Up @@ -581,6 +581,18 @@ Methods:

- <code title="get /onchain/networks/{network}/tokens/{token_address}/pools">client.onchain.networks.tokens.pools.<a href="./src/coingecko_python/resources/onchain/networks/tokens/pools.py">get</a>(token_address, \*, network, \*\*<a href="src/coingecko_python/types/onchain/networks/tokens/pool_get_params.py">params</a>) -> <a href="./src/coingecko_python/types/onchain/networks/tokens/pool_get_response.py">PoolGetResponse</a></code>

#### Trades

Types:

```python
from coingecko_python.types.onchain.networks.tokens import TradeGetResponse
```

Methods:

- <code title="get /onchain/networks/{network}/tokens/{token_address}/trades">client.onchain.networks.tokens.trades.<a href="./src/coingecko_python/resources/onchain/networks/tokens/trades.py">get</a>(token_address, \*, network, \*\*<a href="src/coingecko_python/types/onchain/networks/tokens/trade_get_params.py">params</a>) -> <a href="./src/coingecko_python/types/onchain/networks/tokens/trade_get_response.py">TradeGetResponse</a></code>

## Pools

### Megafilter
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "coingecko_python"
version = "0.1.0-alpha.2"
version = "0.1.0-alpha.3"
description = "The official Python library for the coingecko API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/coingecko_python/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "coingecko_python"
__version__ = "0.1.0-alpha.2" # x-release-please-version
__version__ = "0.1.0-alpha.3" # x-release-please-version
14 changes: 14 additions & 0 deletions src/coingecko_python/resources/coins/coins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing_extensions import Literal

import httpx

from .list import (
Expand Down Expand Up @@ -179,6 +181,7 @@ def get_id(
*,
community_data: bool | NotGiven = NOT_GIVEN,
developer_data: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
localization: bool | NotGiven = NOT_GIVEN,
market_data: bool | NotGiven = NOT_GIVEN,
sparkline: bool | NotGiven = NOT_GIVEN,
Expand All @@ -201,6 +204,10 @@ def get_id(

developer_data: include developer data, default: true

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

localization: include all the localized languages in the response, default: true

market_data: include market data, default: true
Expand Down Expand Up @@ -230,6 +237,7 @@ def get_id(
{
"community_data": community_data,
"developer_data": developer_data,
"dex_pair_format": dex_pair_format,
"localization": localization,
"market_data": market_data,
"sparkline": sparkline,
Expand Down Expand Up @@ -312,6 +320,7 @@ async def get_id(
*,
community_data: bool | NotGiven = NOT_GIVEN,
developer_data: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
localization: bool | NotGiven = NOT_GIVEN,
market_data: bool | NotGiven = NOT_GIVEN,
sparkline: bool | NotGiven = NOT_GIVEN,
Expand All @@ -334,6 +343,10 @@ async def get_id(

developer_data: include developer data, default: true

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

localization: include all the localized languages in the response, default: true

market_data: include market data, default: true
Expand Down Expand Up @@ -363,6 +376,7 @@ async def get_id(
{
"community_data": community_data,
"developer_data": developer_data,
"dex_pair_format": dex_pair_format,
"localization": localization,
"market_data": market_data,
"sparkline": sparkline,
Expand Down
12 changes: 12 additions & 0 deletions src/coingecko_python/resources/coins/tickers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get(
id: str,
*,
depth: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
exchange_ids: str | NotGiven = NOT_GIVEN,
include_exchange_logo: bool | NotGiven = NOT_GIVEN,
order: Literal["trust_score_desc", "trust_score_asc", "volume_desc", "volume_asc"] | NotGiven = NOT_GIVEN,
Expand All @@ -67,6 +68,10 @@ def get(
depth: include 2% orderbook depth, ie. `cost_to_move_up_usd` and
`cost_to_move_down_usd` Default: false

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

exchange_ids: exchange ID \\**refers to [`/exchanges/list`](/reference/exchanges-list).

include_exchange_logo: include exchange logo, default: false
Expand Down Expand Up @@ -95,6 +100,7 @@ def get(
query=maybe_transform(
{
"depth": depth,
"dex_pair_format": dex_pair_format,
"exchange_ids": exchange_ids,
"include_exchange_logo": include_exchange_logo,
"order": order,
Expand Down Expand Up @@ -132,6 +138,7 @@ async def get(
id: str,
*,
depth: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
exchange_ids: str | NotGiven = NOT_GIVEN,
include_exchange_logo: bool | NotGiven = NOT_GIVEN,
order: Literal["trust_score_desc", "trust_score_asc", "volume_desc", "volume_asc"] | NotGiven = NOT_GIVEN,
Expand All @@ -151,6 +158,10 @@ async def get(
depth: include 2% orderbook depth, ie. `cost_to_move_up_usd` and
`cost_to_move_down_usd` Default: false

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

exchange_ids: exchange ID \\**refers to [`/exchanges/list`](/reference/exchanges-list).

include_exchange_logo: include exchange logo, default: false
Expand Down Expand Up @@ -179,6 +190,7 @@ async def get(
query=await async_maybe_transform(
{
"depth": depth,
"dex_pair_format": dex_pair_format,
"exchange_ids": exchange_ids,
"include_exchange_logo": include_exchange_logo,
"order": order,
Expand Down
26 changes: 23 additions & 3 deletions src/coingecko_python/resources/exchanges/exchanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import httpx

from ...types import exchange_get_params, exchange_get_list_params
from ...types import exchange_get_params, exchange_get_id_params, exchange_get_list_params
from .tickers import (
TickersResource,
AsyncTickersResource,
Expand Down Expand Up @@ -120,6 +120,7 @@ def get_id(
self,
id: str,
*,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -133,6 +134,10 @@ def get_id(
ID**

Args:
dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -146,7 +151,11 @@ def get_id(
return self._get(
f"/exchanges/{id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"dex_pair_format": dex_pair_format}, exchange_get_id_params.ExchangeGetIDParams),
),
cast_to=ExchangeGetIDResponse,
)
Expand Down Expand Up @@ -268,6 +277,7 @@ async def get_id(
self,
id: str,
*,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -281,6 +291,10 @@ async def get_id(
ID**

Args:
dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -294,7 +308,13 @@ async def get_id(
return await self._get(
f"/exchanges/{id}",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{"dex_pair_format": dex_pair_format}, exchange_get_id_params.ExchangeGetIDParams
),
),
cast_to=ExchangeGetIDResponse,
)
Expand Down
12 changes: 12 additions & 0 deletions src/coingecko_python/resources/exchanges/tickers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get(
*,
coin_ids: str | NotGiven = NOT_GIVEN,
depth: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
include_exchange_logo: bool | NotGiven = NOT_GIVEN,
order: Literal["trust_score_desc", "trust_score_asc", "volume_desc", "volume_asc", "base_target"]
| NotGiven = NOT_GIVEN,
Expand All @@ -70,6 +71,10 @@ def get(
depth: include 2% orderbook depth (Example: cost_to_move_up_usd &
cost_to_move_down_usd),default: false

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

include_exchange_logo: include exchange logo, default: false

order: use this to sort the order of responses, default: trust_score_desc
Expand Down Expand Up @@ -97,6 +102,7 @@ def get(
{
"coin_ids": coin_ids,
"depth": depth,
"dex_pair_format": dex_pair_format,
"include_exchange_logo": include_exchange_logo,
"order": order,
"page": page,
Expand Down Expand Up @@ -134,6 +140,7 @@ async def get(
*,
coin_ids: str | NotGiven = NOT_GIVEN,
depth: bool | NotGiven = NOT_GIVEN,
dex_pair_format: Literal["contract_address", "symbol"] | NotGiven = NOT_GIVEN,
include_exchange_logo: bool | NotGiven = NOT_GIVEN,
order: Literal["trust_score_desc", "trust_score_asc", "volume_desc", "volume_asc", "base_target"]
| NotGiven = NOT_GIVEN,
Expand All @@ -155,6 +162,10 @@ async def get(
depth: include 2% orderbook depth (Example: cost_to_move_up_usd &
cost_to_move_down_usd),default: false

dex_pair_format:
set to `symbol` to display DEX pair base and target as symbols, default:
`contract_address`

include_exchange_logo: include exchange logo, default: false

order: use this to sort the order of responses, default: trust_score_desc
Expand Down Expand Up @@ -182,6 +193,7 @@ async def get(
{
"coin_ids": coin_ids,
"depth": depth,
"dex_pair_format": dex_pair_format,
"include_exchange_logo": include_exchange_logo,
"order": order,
"page": page,
Expand Down
20 changes: 18 additions & 2 deletions src/coingecko_python/resources/onchain/networks/pools/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_addresses(
*,
network: str,
include: str | NotGiven = NOT_GIVEN,
include_volume_breakdown: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -62,6 +63,8 @@ def get_addresses(
include: attributes to include, comma-separated if more than one to include Available
values: `base_token`, `quote_token`, `dex`

include_volume_breakdown: include volume breakdown, default: false

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -81,7 +84,13 @@ def get_addresses(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"include": include}, multi_get_addresses_params.MultiGetAddressesParams),
query=maybe_transform(
{
"include": include,
"include_volume_breakdown": include_volume_breakdown,
},
multi_get_addresses_params.MultiGetAddressesParams,
),
),
cast_to=MultiGetAddressesResponse,
)
Expand Down Expand Up @@ -113,6 +122,7 @@ async def get_addresses(
*,
network: str,
include: str | NotGiven = NOT_GIVEN,
include_volume_breakdown: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -128,6 +138,8 @@ async def get_addresses(
include: attributes to include, comma-separated if more than one to include Available
values: `base_token`, `quote_token`, `dex`

include_volume_breakdown: include volume breakdown, default: false

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -148,7 +160,11 @@ async def get_addresses(
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{"include": include}, multi_get_addresses_params.MultiGetAddressesParams
{
"include": include,
"include_volume_breakdown": include_volume_breakdown,
},
multi_get_addresses_params.MultiGetAddressesParams,
),
),
cast_to=MultiGetAddressesResponse,
Expand Down
Loading
Loading