# Prices

<details>

<summary><mark style="color:purple;">Straight to the code!</mark></summary>

Possible tokens are: XLM, XRP, BTC, ETH, CELO, BNB, MDA, HTR, ADA, AVAX, SOL, MATIC, BRL, USD.

```javascript
const sdk = new CryptumSdk({
  environment: 'testnet',
  apiKey: 'YOUR-API-KEY'
})
// list for XLM
const prices = await sdk.prices.getPrices('XLM')
// Prices {
//   "BRL": 1.811,
//   "USD": 0.3495,
//   "EUR": 0.2967,
//   "BTC": 7.35687406736623e-06,
//   "ETH": 0.00010271074069284932,
//   "XLM": 1,
//   "XRP": 0.29052369077306733,
//   "BNB": 0.0007402151812944764,
//   "MDA": 0.38824705620973116,
//   "CELO": 0.06321215409658167,
//   "HTR": 0.3900669642857143,
//   "ADA": 0.18340652,
//   "AVAX": 0.00475974,
//   "SOL":0.00144091,
// }
```

</details>

<mark style="color:purple;">**Step 1**</mark>

The first prerequisite you will need is the creation of an **account** and a **Project (API Key**) on Cryptum Dashboard.

**PS**: Our dashboard is almost ready! To generate an API Key, contact <hello@blockforce.in>

<mark style="color:purple;">**Step 2**</mark>

With a valid Cryptum API Key, you can then instantiate the SDK as follows:

```javascript
const CryptumSdk = require('cryptum-sdk')

const sdk = new CryptumSdk({
  environment: 'testnet',  // 'testnet', 'mainnet'
  apiKey: "YOUR-API-KEY-HERE",
})
```

<mark style="color:purple;">**Step 3**</mark>

Define which currency you want to query and pass it as a parameter. <mark style="color:purple;">**I**</mark>n the results, you can see all currencies available.

```javascript
const prices = await sdk.prices.getPrices('BTC')
```

```javascript
Prices {
  BRL: 288334.24345847557,
  USD: 50689.16,
  EUR: 44770.01,
  ETH: 12.358597889080416,
  XLM: 177731.9775596073,
  MDA: 93990.65455219729,
  BNB: 92.25940082268575,
  XRP: 50336.80238331678,
  CELO: 10304.76926204513,
  BTC: 1,
  HTR: 25093.643564356436,
  ADA: 34909.88980716254,
  AVAX: 406.391084743045
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptum.io/english/community-edition/sdk-guides/prices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
