Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

feat: getXcnRate(), getXcnRateByBlockNumber #5

Open
wants to merge 3 commits into
base: chore/updateLiquidation
Choose a base branch
from

Conversation

dissimilllate
Copy link
Contributor

No description provided.

const axios = require('axios');

const BASE_URL = 'https://api.onyx.org/api';
const XCNContractAddress = '0x1961AD247B47F4f2242E55a0E5578C6cf01F8D12';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me.
The only thing is that the name of XCNContractAddress.
Actually that address is oXCN token, and the name - XCNContractAddress looks like the XCN token address.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's oXCN address. API responds with empty result when XCN address is used. getXcnRate(): tokenPrice is price of XCN token, not oXCN. getXcnRateByBlockNumber(): priceUSD is price of XCN token, not oXCN.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants