Comments (2)
Same here, so I will share what I did.
Here is where I went: https://developers.celsius.network/
- You need to request a Partner API key. Email link is at the bottom of the page.
After you get a key from the Business Development team
- Authenticate in the SDK using
API_KEY
and follow the calls in the test script - that worked for me.
Celsius({
authMethod: AUTH_METHODS.API_KEY,
partnerKey: partnerKey, // Requested from https://developers.celsius.network/
environment: ENVIRONMENT.PRODUCTION,
})
.then((celsius) => {
celsius
.getBalanceSummary(userApiKey)
.then((balanceSummary) => {
console.log(balanceSummary);
})
.catch((error) => {
console.log("Error", error);
});
})
.catch((e) => {
console.error("Error", e);
});
Example response balanceSummary
{
balance: {
eth: '0',
btc: '0',
dash: '0',
bch: '0',
bsv: '0',
ltc: '0',
zec: '0',
btg: '0',
xrp: '0',
xlm: '0',
omg: '0',
tusd: '0',
gusd: '0',
pax: '0',
paxg: '0',
usdc: '0',
dai: '0',
mcdai: '0',
cel: '0',
zrx: '0',
orbs: '0',
'usdt erc20': '0',
tgbp: '0',
taud: '0',
thkd: '0',
tcad: '0',
eos: '0',
sga: '0',
sgr: '0',
xaut: '0',
etc: '0',
bat: '0',
busd: '0',
knc: '0',
link: '0',
lpt: '0',
matic: '0',
snx: '0',
uma: '0',
uni: '0',
mana: '0',
comp: '0',
spark: '0',
steth: '0',
aave: '0',
bnt: '0'
}
}
- Where you see
userSecret
orapiKey
parameters in the documentation/code, that's the Celsius user generated API key (Celsius App, go to Profile > API Key > Generate API Key)
References
- https://developers.celsius.network/integration-partner.html#initializing-the-sdk
Line 204 in 1d65b65
- https://documenter.getpostman.com/view/4207695/Rzn6v2mZ#59eb24d1-4936-4ed4-8f29-096f27c7fbc4
- https://github.com/CelsiusNetwork/celsius-js-sdk/blob/master/test/test.js
Good luck!
from celsius-js-sdk.
Hi, I have yet to understand why it doesn't work, but in my case after having received a proper partnerKey
(a partner one, securely transmitted by Celsius via email) and set the sdk to work with partnerKey
(partner) and userSecret
(created through the app) I received these errors:
This is shown in a normal browser:
Unhandled Rejection (Error): No signature was provided for verification.
while this appears if I run chrome in dev mode (--disable-web-security)
Unhandled Rejection (Error): wrong public key type
For your reference, my init code is as follows:
const initCelsius = async () => {
const celsius = await Celsius({
authMethod: AUTH_METHODS.API_KEY,
partnerKey: "****",
environment: ENVIRONMENT.PRODUCTION,
})
const rates = celsius.getInterestRates(
"****"
)
console.log(rates)
}
I also tried the combinations of auth keys in Postman, and I've successfully been able to get a response, so the problems is somewhere else.
Could the problem be due to the fact that I'm using the sdk on the frontend side (react)?
from celsius-js-sdk.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celsius-js-sdk.