| 220 | } |
| 221 | }) |
| 222 | const reqObjPOST = (url, data = {}, method = 'POST', key) => ({ |
| 223 | url: url, |
| 224 | form: data, |
| 225 | method: method, |
| 226 | family: Binance.options.family, |
| 227 | localAddress: Binance.options.localAddress, |
| 228 | timeout: Binance.options.recvWindow, |
| 229 | forever: Binance.options.keepAlive, |
| 230 | qsStringifyOptions: { |
| 231 | arrayFormat: 'repeat' |
| 232 | }, |
| 233 | headers: { |
| 234 | 'User-Agent': userAgent, |
| 235 | 'Content-type': contentType, |
| 236 | 'X-MBX-APIKEY': key || '' |
| 237 | } |
| 238 | }) |
| 239 | /** |
| 240 | * Create a http request to the public API |
| 241 | * @param {string} url - The http endpoint |