You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wondering how to "[insert something crypto & nodejs related]"? Welcome to a loose collection of node.js examples and demos in the world of algo trading (especially cryptocurrencies).
4
8
5
9
What kind of examples?
10
+
6
11
- Working with crypto exchange REST APIs
7
12
- Working with crypto exchange WebSocket streams
8
13
- Anything else crypto + node.js?
9
14
10
15
Note: these are not meant to suggest best practices. These are purely demonstrations for one (or more) way(s) for doing various things.
Node.js examples will be any file that ends with `.js`. If the example has a readme, refer to the readme for specific instructions, otherwise use the following command to run the example with node.js:
32
+
37
33
```bash
38
34
node src/path/to/example.js
39
35
```
40
36
41
37
### Running examples (typescript)
42
38
43
39
Typescript examples will be any file that ends with `.ts`. If the example has a readme, refer to the readme for specific instructions, otherwise use the following command to run the example with typescript's ts-node:
40
+
44
41
```bash
45
42
npx ts-node src/path/to/example.ts
46
43
```
47
44
48
45
Refer to the following documentation for guidance on ts-node: https://www.npmjs.com/package/ts-node#overview
49
46
50
47
### Providing API keys
48
+
51
49
Some examples make private API calls (e.g. the [account monitoring](https://github.com/tiagosiebler/awesome-crypto-examples/blob/master/src/exchanges/binance/account-events/log-account-events.ts#L9-L10) ones). These rely on API credentials to make signed API calls to your account.
52
50
53
51
Either locally download a copy of this repo and edit the values directly, or provide these as environmental variables. If a sample has the following process.env snippet:
[](https://star-history.com/#tiagosiebler/bybit-api&tiagosiebler/okx-api&tiagosiebler/binance&tiagosiebler/bitget-api&tiagosiebler/bitmart-api&tiagosiebler/gateio-api&tiagosiebler/kucoin-api&tiagosiebler/coinbase-api&tiagosiebler/orderbooks&tiagosiebler/accountstate&tiagosiebler/awesome-crypto-examples&Date)
0 commit comments