Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.
/ okcoin-api Public archive

Basic Javascript wrapper for OKCoin & OKEx's WebSocket API.

License

Notifications You must be signed in to change notification settings

nyg/okcoin-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

okcoin-api

Basic Javascript wrapper for OKCoin & OKEx's WebSocket API.

Example

See index.html for a live working example.

function handleIndex(message) {
    // ...
}

function handleDepth(message) {
    // ...
}

new OKCoin('wss://real.okex.com:10441/websocket')
.addChannelHandler('ok_sub_futureusd_btc_index', handleIndex)
.addChannelHandler('ok_sub_futureusd_btc_depth_quarter_60', handleDepth)
.start()

Use

jsDelivr can be used to serve a specific version (see tags for version numbers):

<script src="https://cdn.jsdelivr.net/gh/nyg/[email protected]/okcoin-api.js"></script>

Dependency

Requires pako.

Note

Doesn't support version 3 of the API.

About

Basic Javascript wrapper for OKCoin & OKEx's WebSocket API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published