Let CCXT Read from a credentials.js file
See original GitHub issueI would like to enable CCXT to read from a credentials.js file when needing exchange credentials instead of having to put the credentials inside the source.
For example, instead of (this is from the instantiate-all-at-once.js example):
"use strict";
const ccxt = require ('../../ccxt');
async function test () {
let exchanges = {
"bittrex": {
"apiKey": "60f38a5818934fc08308778f94d3d8c4",
"secret": "9d294ddb5b944403b58e5298653720c1",
},
"bitfinex": {
"apiKey": "02YsRDRAFwqt9JXfFKPIEw82mgmNbZtfpwvt8q5WK5a",
"secret": "IummLrCfcZ9d9NPEtMg6chCpO8hugCvsDIscNm1F3pE"
},
}
let ids = ccxt.exchanges.filter (id => id in exchanges)
we could do something like:
"use strict";
const ccxt = require ('../../ccxt');
const exchanges = require('credentials.js').credentials;
async function test () {
let ids = ccxt.exchanges.filter (id => id in exchanges)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Manual · ccxt/ccxt Wiki - GitHub
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges - Manual · ccxt/ccxt Wiki.
Read more >ccxt Documentation - Read the Docs
ccxt Documentation, 1.13.142. A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bit-.
Read more >CCXT — ccxt 2.4.60 documentation
A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs ...
Read more >Encrypt & Decrypt user credentials | Crypto-JS | Playwright
A demonstration of how to use CryptoJS to encrypt and decrypt data, including code examples and step-by-step instructionsCrypto- JS is a ...
Read more >Complete Authentication with Credentials, Google & GitHub
We will learn how to use the NextAuth. js library to make Google, Github, and Custom Credential Login in the same application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cklester Actually, you can use
require
to load JSON:That seems to be the way to go… right? 🥇