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
4 changes: 2 additions & 2 deletions docs/utility/markets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Markets

This is a CoinGecko Client for the Platform SDK. The implementation makes use of [CoinCap](/docs/sdk/markets/coincap), [CoinGecko](/docs/sdk/markets/coingecko) and [CryptoCompare](/docs/sdk/markets/cryptocompare) and adheres to the contracts laid out in the [specification](/docs/specification.md).
This is a CoinGecko Client for the Platform SDK. The implementation makes use of [CoinCap](/docs/sdk/markets/coincap), [CoinGecko](/docs/sdk/markets/coingecko) and adheres to the contracts laid out in the [specification](/docs/specification.md).

## Installation

Expand All @@ -15,7 +15,7 @@ pnpm install @ardenthq/markets
```typescript
import { MarketService } from "@ardenthq/markets";

MarketService.make("cryptocompare", new Request());
MarketService.make("coingecko", new Request());
```

### Verify if the given currency exists on the service
Expand Down
3 changes: 2 additions & 1 deletion packages/markets/source/drivers/coingecko/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class CoinGecko implements PriceTracker {
* @memberof PriceTracker
*/
readonly #host: string = "https://api.coingecko.com/api/v3";
readonly #maxDays: number = 365;

/**
* Creates an instance of PriceTracker.
Expand Down Expand Up @@ -90,7 +91,7 @@ export class CoinGecko implements PriceTracker {

const body = await this.#get(`coins/${tokenId}/market_chart`, {
vs_currency: options.currency,
days: options.days,
days: Math.min(options.days, this.#maxDays),
});

return new HistoricalPriceTransformer(body).transform(options);
Expand Down
93 changes: 0 additions & 93 deletions packages/markets/source/drivers/cryptocompare/index.test.js

This file was deleted.

136 changes: 0 additions & 136 deletions packages/markets/source/drivers/cryptocompare/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading