Skip to content

Commit

Permalink
fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DroidZed committed Apr 10, 2024
1 parent f0513cb commit a1a2b82
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"python.analysis.typeCheckingMode": "basic",
"python.analysis.extraPaths": ["./src"],
"cSpell.words": ["coinpaprika"],
"cSpell.words": [
"buterin",
"coinpaprika",
"convt",
"exchg",
"icos",
"OHLC",
"ohlcv",
"vitalik"
],
"python.analysis.autoImportCompletions": true
}
11 changes: 4 additions & 7 deletions examples/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
from coinpaprika_async import (
CoinsEndpoint,
ExchangesEndpoint,
KeyEndpoint,
MarketEndpoint,
MiscellaneousEndpoints,
TagsEndpoint,
PeopleEndpoint,
TickersEndpoint,
)

Expand Down Expand Up @@ -71,7 +68,7 @@ async def list_tags(client: TagsEndpoint):
print(await client.tags())


async def list_tags_additonal_fields(client: TagsEndpoint):
async def list_tags_additional_fields(client: TagsEndpoint):
print(await client.tags(additional_fields="coins,icos"))


Expand Down Expand Up @@ -100,18 +97,18 @@ async def get_historical_information(client: TickersEndpoint):


# List exchanges
async def get_echange_list(client: ExchangesEndpoint):
async def get_exchange_list(client: ExchangesEndpoint):
print(await client.exchange_list())


# Get exchange by ID
async def exchange_currencies(client: ExchangesEndpoint):
print(await client.exchange("binance", {"quotes": "USD"}))
print(await client.exchange("binance", quotes="USD"))


# Get markets by exchange ID (USD,BTC,ETH,PLN) with quotes USD
async def exchg_markers_by_id(client: ExchangesEndpoint):
print(await client.exchange_markets("binance", {"quotes": "USD"}))
print(await client.exchange_markets("binance", quotes="USD"))


# Search
Expand Down

0 comments on commit a1a2b82

Please sign in to comment.