Advertisement
OppaiCyber

node

Jun 6th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. const request = require("request") const sign = require("jsonwebtoken").sign const queryEncode = require("querystring").encode const query = queryEncode({state: state, page: 1}); const payload = { access_key: accessKey, nonce: (new Date).getTime(), query: query }; const token = sign(payload, secretKey); var options = { method: "GET", url: "https://api.upbit.com/v1/orders?" + query, headers: {Authorization: Bearer ${token}} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement