State: Draft
Based on the Peatio Stable branch
To the coin daemon's {coin}.conf file, include the -walletnotify command:
# Notify when receiving coins
| /// SEE doc.zebitex.com for availble channels | |
| const WebSocket = require('ws') | |
| const ws = new WebSocket('wss://pusher-stage.zebitex.com/app/pusher_key?protocol=7&client=js&version=5.0.3&flash=false'); // ws.zebitex.com for prod | |
| ws.on('open', function open() { | |
| //// once connected : {"event":"pusher:connection_established","data":"{\"socket_id\":\"6.625468\",\"activity_timeout\":120}"} | |
| const socket_id= "6.625468" | |
| const info = await zebitex.command_rest.getSessionInfo() | |
| //// info payload : {"sn":"ZEBXXXXXXXXTEX","isVerified":true,"isCorporate":false,"email":"[email protected]","lang":null,"nickname":"nick","canChangePassword":true,"isApplicationVerified":true,"emailNotifications":true,"pushNotifications":true,"productAnnouncementsNotifications":true,"mfa":{"enabled":false,"passed":false}} |
| URL: /api/v1/orders/:id # retourne un ordre par son id | |
| method : GET | |
| required: id | |
| example payload : | |
| {"id":190,"side":"bid","price":"10.00","total":"10.00","amount":"1.00000000","filled":"0.00","base":"btc","quote":"eur","timestamp":1599559342,"type":"limit","state":"wait"} | |
| URL: /api/v1/orders/opened?per=10&page=1 | |
| method: GET |
| import nnpy #nanomsg | |
| sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB) | |
| sub.connect('ipc:///tmp/3-rrEWX7gc7D9mwcdrdBxBTdqh1a7WDVsMuadhTZgyXfFcRz45L-decisions') | |
| #sub.connect('ipc:///tmp/3-11111111111111111111111111111111LpoYY-decisions') | |
| x= sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '') | |
| print(sub.recv()) |
| import pysher | |
| import sys,time | |
| # Add a logging handler so we can see the raw communication data | |
| import logging | |
| root = logging.getLogger() | |
| root.setLevel(logging.DEBUG) | |
| ch = logging.StreamHandler(sys.stdout) | |
| root.addHandler(ch) | |
| global pysher |
| const pkcs11 = require("pkcs11js"); | |
| const ffi = require("ffi"); | |
| const ref = require("ref"); | |
| const ArrayType = require('ref-array') | |
| const StructType = require("ref-struct"); | |
| const KEYPAIR_ID = Buffer.from("GOST keypair"); | |
| // PKCS11 types | |
| const CK_BYTE = ref.types.byte; |
| coins = [('BTC', 'https://github.com/bitcoin/bitcoin/raw/master/src/chainparams.cpp'), | |
| ('TEST', 'https://github.com/bitcoin/bitcoin/raw/master/src/chainparams.cpp'), | |
| ('LTC', | |
| 'https://github.com/litecoin-project/litecoin/raw/master-0.10/src/chainparams.cpp'), | |
| ('DOGE', | |
| 'https://github.com/dogecoin/dogecoin/raw/master/src/chainparams.cpp'), | |
| ('RDD', | |
| 'https://github.com/reddcoin-project/reddcoin/raw/master/src/base58.h'), | |
| ('DASH', 'https://github.com/dashpay/dash/raw/master/src/chainparams.cpp'), | |
| ('PPC', 'https://github.com/belovachap/peercoin/raw/master/src/base58.h'), |
| module.exports = { | |
| bitcoin: { | |
| messagePrefix: '\x18Bitcoin Signed Message:\n', | |
| bech32: 'bc', | |
| bip32: { | |
| public: 0x0488b21e, | |
| private: 0x0488ade4 | |
| }, | |
| pubKeyHash: 0x00, | |
| scriptHash: 0x05, |
State: Draft
Based on the Peatio Stable branch
To the coin daemon's {coin}.conf file, include the -walletnotify command:
# Notify when receiving coins
| var util=require('util') | |
| var WebSocketClient = require('websocket').client; | |
| var client = new WebSocketClient(); | |
| var conn = null | |
| var received = false | |
| client.on('connectFailed', function(error) { | |
| console.log('Connect Error: ' + error.toString()); | |
| }); |
| import sys | |
| import pprint | |
| from pyethereum import * | |
| try: | |
| chain = "/home/vagrant/.decerver/blockchains/"+sys.argv[1].strip()+"/0/" | |
| dbfile = chain +"database/" | |
| genesis = chain +'genesis.json' | |
| except: | |
| chain = "/home/vagrant/.decerver/blockchains/thelonious/f858469a00e80e4f5eb536501eb7d98c7e1cc432/0/" |