https://github.com/the-launch-tech/kraken-sdk
SDK for the Kraken exchange API. Written in Typescript and compiled to ES5 for NPM. Not published.
https://github.com/the-launch-tech/kraken-sdk
cryptocurrency kraken nodejs npm sdk typescript
Last synced: 3 months ago
JSON representation
SDK for the Kraken exchange API. Written in Typescript and compiled to ES5 for NPM. Not published.
- Host: GitHub
- URL: https://github.com/the-launch-tech/kraken-sdk
- Owner: the-launch-tech
- License: mit
- Created: 2019-12-23T04:04:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-10T15:05:16.000Z (over 5 years ago)
- Last Synced: 2025-07-26T20:12:34.964Z (12 months ago)
- Topics: cryptocurrency, kraken, nodejs, npm, sdk, typescript
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Kraken SDK 1.0.0
Not published to NPM.
---
##### Credit notes: inspired By https://github.com/nothingisdead/npm-kraken-api
- Differences:
- Written in Typescript, compiled to ES5
- Structure
- Flexibility
- Axios interceptor callbacks
- Minimal dependencies
- Non-deprecated use of crypto
---
All endpoints matched semantically.
Typescript integrated.
Version 2.x.x will contain a WebSocket implementation.
## Additional Features
- Axios `interceptor` callbacks on KrakenInstance
## Installation
Not published yet.
## Import Package(s)
- `const Kraken = require('kraken-node-sdk')`
- Or ES6 imports: `import Kraken from 'kraken-node-sdk'`
## Usage
```javascript
const Kraken = require('kraken-node-sdk')
const KrakenInstance = new Kraken({
KEY: 'xxxxxxxxxx',
SECRET: 'xxxxxxxx',
})
const requestInterceptor = KrakenInstance.addRequestInterceptor(
config => config,
error => error
)
const responseInterceptor = KrakenInstance.addResponseInterceptor(
response => response,
error => error
)
...
KrakenInstance.public('Time', { ... })
.then(console.log)
.catch(console.error)
...
KrakenInstance.removeRequestInterceptor(requestInterceptor)
```
## Auxillary Helper Methods
#### `addRequestInterceptor`
- Docs
- Callback to access Axios interceptor.
- `const interceptor = KrakenInstance.addRequestInterceptor(onBeforeCallback, onErrorCallback)`
- Types
```typescript
(
onBeforeCallback (value: AxiosRequestConfig) => AxiosRequestConfig | Promise,
onErrorCallback: (error: AxiosError) => AxiosError | Promise
) => any
```
---
#### `removeRequestInterceptor`
- Docs
- Callback to access Axios interceptor.
- `KrakenInstance.removeRequestInterceptor(interceptor)`
- Types
```typescript
(interceptor: any) => void
```
---
## History
- `1.0.0` Initial Commit
## Credits
- Company: ©2019 The Launch
- Author: Daniel Griffiths
- Role: Founder and Engineer
- Project: ©2020 CryptoDock
## License
MIT Licence ©2020 Daniel Griffiths