Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.
This repository was archived by the owner on May 1, 2018. It is now read-only.

TradeBuy Working? #159

@Lboncich

Description

@Lboncich

I'm having trouble using the TradeBuy function, for market order and limit order. I keep getting URL Request error. The other functions work with my API just fine. Here is the error log. Is anyone having success with these functions?

Obviously I've hid my API Key.

Thanks in advance

`{ success: false,

message: 'URL request error',
error: null,
result:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 10,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'bittrex.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 505,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 18363,
_destroyed: false,
[Symbol(asyncId)]: 934,
[Symbol(bytesRead)]: 2925,
[Symbol(asyncId)]: 946,
[Symbol(triggerAsyncId)]: 943 },
connection:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 10,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'bittrex.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 505,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 18363,
_destroyed: false,
[Symbol(asyncId)]: 934,
[Symbol(bytesRead)]: 2925,
[Symbol(asyncId)]: 946,
[Symbol(triggerAsyncId)]: 943 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ date: 'Fri, 30 Mar 2018 05:11:17 GMT',
'content-type': 'text/html',
'transfer-encoding': 'chunked',
connection: 'close',
'set-cookie': [Array],
'cache-control': 'private',
'strict-transport-security': 'max-age=15768000',
'x-xss-protection': '1; mode=block',
'x-content-type-options': 'nosniff',
'x-download-options': 'noopen',
'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
server: 'cloudflare',
'cf-ray': '4038131eaadf997f-LAX' },
rawHeaders:
[ 'Date',
'Fri, 30 Mar 2018 05:11:17 GMT',
'Content-Type',
'text/html',
'Transfer-Encoding',
'chunked',
'Connection',
'close',
'Set-Cookie',
'__cfduid=d092af5aa723f65f866f67cd9873d556a1522386677; expires=Sat, 30-Mar-19 05:11:17 GMT; path=/; domain=.bittrex.com; HttpOnly',
'Cache-Control',
'private',
'Strict-Transport-Security',
'max-age=15768000',
'X-XSS-Protection',
'1; mode=block',
'X-Content-Type-Options',
'nosniff',
'X-Download-Options',
'noopen',
'Expect-CT',
'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
'Server',
'cloudflare',
'CF-RAY',
'4038131eaadf997f-LAX' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 500,
statusMessage: 'Internal Server Error',
client:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 10,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: 'bittrex.com',
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 505,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 18363,
_destroyed: false,
[Symbol(asyncId)]: 934,
[Symbol(bytesRead)]: 2925,
[Symbol(asyncId)]: 946,
[Symbol(triggerAsyncId)]: 943 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'GET /Api/v2.0/key/market/TradeBuy?apikey=cxxxxxxxxxxxxxxxxxx&nonce=1522386675311&MarketName=BTC-DASH&OrderType=MARKET&Quantity=0.17756302989918385&TimeInEffect=GOOD_TIL_CANCELLED&ConditionType=NONE HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; Node Bittrex API)\r\nContent-type: application/x-www-form-urlencoded\r\napisign: 8dd6db65dd6f3ece81ce5145b3223ead8cfe805c2173e4221dfcb4393e0b9614513cfcea37dc5ff8fa9b819428685880bebca25e3b23d2777df844a24f64a7c7\r\nhost: bittrex.com\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'GET',
path: '/Api/v2.0/key/market/TradeBuy?apikey=xxxxxxxxxxxxxxx&nonce=1522386675311&MarketName=BTC-DASH&OrderType=MARKET&Quantity=0.17756302989918385&TimeInEffect=GOOD_TIL_CANCELLED&ConditionType=NONE',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: [Function: emitTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
method: 'GET',
agent: [Object],
headers: [Object],
uri: [Object],
timeout: 15000,
callback: [Function],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'bittrex.com',
path: '/Api/v2.0/key/market/TradeBuy?apikey=xxxxxxxxxxxxxx&nonce=1522386675311&MarketName=BTC-DASH&OrderType=MARKET&Quantity=0.17756302989918385&TimeInEffect=GOOD_TIL_CANCELLED&ConditionType=NONE',
httpModule: [Object],
agentClass: [Object],
_started: true,
href: 'https://bittrex.com/Api/v2.0/key/market/TradeBuy?apikey=xxxxxxxxxxxxxxx&nonce=1522386675311&MarketName=BTC-DASH&OrderType=MARKET&Quantity=0.17756302989918385&TimeInEffect=GOOD_TIL_CANCELLED&ConditionType=NONE',
req: [Object],
ntick: true,
timeoutTimer: null,
response: [Circular],
originalHost: 'bittrex.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: '?\r\n\r\n\r\n <title>Error: 500</title>\r\n \r\n \r\n\r\n \r\n \r\n <script src="/bundles/modernizr"></script>\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n

\r\n \r\n Bittrex.com\r\n \r\n
\r\n\r\n
\r\n
500 - Uh oh! Something went wrong on our end
\r\n

Don’t worry - it’s not you, it’s us

\r\n Bittrex.com\r\n
\r\n  Go Back\r\n  Home\r\n  Contact Us\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n\r\n \r\n <script src="https://code.jquery.com/jquery-latest.js"></script>\r\n <script src="/content/scripts/bootstrap.min.js"></script>\r\n <script src="/content/scripts/theme.js"></script>\r\n\r\n' } }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions