node-red-contrib-bithumb
v1.0.1
Published
Node-RED node for bithumb
Downloads
6
Maintainers
Readme
node-red-contrib-bithumb
Node-RED node for bithumb
Install
To install the stable version use the Menu - Manage palette - Install
option and search for node-red-contrib-bithumb, or run the following
command in your Node-RED user directory, typically ~/.node-red
npm install node-red-contrib-bithumb
Wrapper bithumb API
https://apidocs.bithumb.com/docs/account
Sample parameters
msg.params = {};
msg.params.currency = 'BTC';
msg.params.wallet_address = '1LUputGTCQ9wKt3KbXp46nn7stqCxTvbZh';
msg.params.order_currency = 'ETH'
msg.params.payment_currency = 'KRW'
return msg;
Sample flows
[{"id":"7c2540b1.20ed8","type":"bithumb","z":"2422d0a1.5c053","name":"account","category":"info","api":"account","order_currency":"ETH","payment_currency":"KRW","creds":"526922f3.2e3efc","x":400,"y":240,"wires":[["725c2df0.78b074"]]},{"id":"931b8083.6d479","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.currency = 'BTC';\nmsg.params.wallet_address = '1LUputGTCQ9wKt3KbXp46nn7stqCxTvbZh';\nmsg.params.order_currency = 'ETH'\nmsg.params.payment_currency = 'KRW'\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":240,"wires":[["7c2540b1.20ed8"]]},{"id":"16b269eb.a77736","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":240,"wires":[["931b8083.6d479"]]},{"id":"725c2df0.78b074","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":240,"wires":[]},{"id":"75cf0323.783eec","type":"bithumb","z":"2422d0a1.5c053","name":"wallet_address","category":"info","api":"wallet_address","order_currency":"","payment_currency":"","creds":"526922f3.2e3efc","x":420,"y":320,"wires":[["aadb1855.c8e668"]]},{"id":"adf7bf41.16f","type":"function","z":"2422d0a1.5c053","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":320,"wires":[["75cf0323.783eec"]]},{"id":"2d9507ec.2e1a68","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":320,"wires":[["adf7bf41.16f"]]},{"id":"aadb1855.c8e668","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":320,"wires":[]},{"id":"1337c96d.0d8c97","type":"bithumb","z":"2422d0a1.5c053","name":"balance","category":"info","api":"balance","order_currency":"ETH","payment_currency":"KRW","creds":"526922f3.2e3efc","x":400,"y":280,"wires":[["9f968fdd.e62df"]]},{"id":"435c79fa.708e38","type":"function","z":"2422d0a1.5c053","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":280,"wires":[["1337c96d.0d8c97"]]},{"id":"32082cc5.9560b4","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":280,"wires":[["435c79fa.708e38"]]},{"id":"9f968fdd.e62df","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":280,"wires":[]},{"id":"46173a75.040b54","type":"bithumb","z":"2422d0a1.5c053","name":"ticker","category":"info","api":"ticker","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":390,"y":360,"wires":[["a5fcfdfc.ed61a"]]},{"id":"8f9e5f78.a465","type":"function","z":"2422d0a1.5c053","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":360,"wires":[["46173a75.040b54"]]},{"id":"d42b203b.70188","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":360,"wires":[["8f9e5f78.a465"]]},{"id":"a5fcfdfc.ed61a","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":360,"wires":[]},{"id":"fec5674a.36d428","type":"bithumb","z":"2422d0a1.5c053","name":"user_transactions","category":"info","api":"user_transactions","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":430,"y":400,"wires":[["71c19584.bbea9c"]]},{"id":"35276acd.86a826","type":"function","z":"2422d0a1.5c053","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":400,"wires":[["fec5674a.36d428"]]},{"id":"86f0709a.9d415","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":400,"wires":[["35276acd.86a826"]]},{"id":"71c19584.bbea9c","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":400,"wires":[]},{"id":"6d6687bf.56cff8","type":"bithumb","z":"2422d0a1.5c053","name":"place","category":"trade","api":"place","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":390,"y":440,"wires":[["fdee9e66.d0aed"]]},{"id":"15626eef.1fbc81","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.units = '1'; //주문 수량 \nmsg.params.price = '1000'; //Currency 거래가\nmsg.params.type = 'bid'; //거래유형 (bid : 매수 ask : 매도)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":440,"wires":[["6d6687bf.56cff8"]]},{"id":"dbebd948.022c48","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":440,"wires":[["15626eef.1fbc81"]]},{"id":"fdee9e66.d0aed","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":440,"wires":[]},{"id":"97dd1b05.a2e958","type":"catch","z":"2422d0a1.5c053","name":"","scope":null,"uncaught":false,"x":100,"y":200,"wires":[["b1040b29.85def8"]]},{"id":"b1040b29.85def8","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":290,"y":200,"wires":[]},{"id":"b7e645f0.ada098","type":"bithumb","z":"2422d0a1.5c053","name":"cancel","category":"trade","api":"cancel","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":390,"y":480,"wires":[["53afee58.b1afb"]]},{"id":"36ae2fda.cd8ca","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.order_id = '1'; //주문 번호\nmsg.params.type = 'bid'; //거래유형 (bid : 매수 ask : 매도)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":480,"wires":[["b7e645f0.ada098"]]},{"id":"49035191.4df2d","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":480,"wires":[["36ae2fda.cd8ca"]]},{"id":"53afee58.b1afb","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":480,"wires":[]},{"id":"fedb16d5.481c38","type":"bithumb","z":"2422d0a1.5c053","name":"market_buy","category":"trade","api":"market_buy","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":410,"y":520,"wires":[["91861f0a.00999"]]},{"id":"ad23ab8e.55ed78","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.units = '1'; //주문 수량 \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":520,"wires":[["fedb16d5.481c38"]]},{"id":"b86cb1d7.6fde","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":520,"wires":[["ad23ab8e.55ed78"]]},{"id":"91861f0a.00999","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":520,"wires":[]},{"id":"46e01bb.e2c94e4","type":"bithumb","z":"2422d0a1.5c053","name":"market_sell","category":"trade","api":"market_sell","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":410,"y":560,"wires":[["e215fa4b.39d9a8"]]},{"id":"56e267f2.e34bc8","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.units = '1'; //주문 수량 \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":560,"wires":[["46e01bb.e2c94e4"]]},{"id":"917a0988.5b1328","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":560,"wires":[["56e267f2.e34bc8"]]},{"id":"e215fa4b.39d9a8","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":560,"wires":[]},{"id":"d17fc229.dee9c","type":"bithumb","z":"2422d0a1.5c053","name":"stop_limit","category":"trade","api":"stop_limit","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":400,"y":600,"wires":[["f9c3bc63.84b24"]]},{"id":"8bcd7d7b.81ece","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.watch_price = '1'; //주문 접수가 진행되는 가격 (자동주문시)\nmsg.params.price = '1'; //Currency 거래가\nmsg.params.units = '1'; //주문 수량 \nmsg.params.type = 'bid'; //거래유형 (bid : 매수 ask : 매도)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":600,"wires":[["d17fc229.dee9c"]]},{"id":"43b19e32.c2669","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":600,"wires":[["8bcd7d7b.81ece"]]},{"id":"f9c3bc63.84b24","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":600,"wires":[]},{"id":"921c3317.469dd","type":"bithumb","z":"2422d0a1.5c053","name":"krw_withdrawal","category":"trade","api":"krw_withdrawal","order_currency":"BTC","payment_currency":"KRW","creds":"526922f3.2e3efc","x":420,"y":640,"wires":[["b77c50f3.8c7d7"]]},{"id":"653c53f0.50d51c","type":"function","z":"2422d0a1.5c053","name":"","func":"msg.params = {};\nmsg.params.bank = '011'; //011_농협은행\nmsg.params.account = '121312432112321'; //출금 계좌번호\nmsg.params.price = '1'; //출금 KRW 금액\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":640,"wires":[["921c3317.469dd"]]},{"id":"abe198b9.d725f8","type":"inject","z":"2422d0a1.5c053","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":640,"wires":[["653c53f0.50d51c"]]},{"id":"b77c50f3.8c7d7","type":"debug","z":"2422d0a1.5c053","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":640,"wires":[]},{"id":"526922f3.2e3efc","type":"bithumbApiKey","name":""}]