Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK Fails in testnet #136

Open
bcodesido opened this issue Jan 4, 2019 · 4 comments
Open

SDK Fails in testnet #136

bcodesido opened this issue Jan 4, 2019 · 4 comments

Comments

@bcodesido
Copy link

bcodesido commented Jan 4, 2019

Hi, using [email protected]

As in issue #122

var sdk = blocktrail.BlocktrailSDK({
    apiKey : "XXXXXXXXXXXXXXXXXXX",
    apiSecret : "XXXXXXXXXXXXXXXXXX",
    testnet : true,
    btccom: true
});

> sdk.address("n33npN2oRNJFFpdoxkrm2CVyZAfRGFxALt").then(function(address) {console.log(JSON.stringify(address, null, 4));}, function(error) {console.log(error);});
{ state: 'pending' }
> { Error
    at Function.Request.handleFailure (/home/user/node_modules/blocktrail-sdk/lib/request.js:222:17)
    at /home/user/node_modules/blocktrail-sdk/lib/request.js:169:31
    at Request.callback (/home/user/node_modules/superagent/lib/node/index.js:728:3)
    at IncomingMessage.parser (/home/user/node_modules/superagent/lib/node/index.js:916:18)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9) statusCode: 504 }
@AlexeyKhmelev
Copy link

AlexeyKhmelev commented Feb 12, 2019

Have exactly the same issue... As I found in code the endpoint starts with tchain for testnet instead of just chain. I've tried the GET request via browser and found that endpoint for mainnet is available

https://chain.api.btc.com/v3/address/136xuuzNXs4yQoPWUhpQGHBUb2Wv2iVyKG
while the same for testnet doesn't:
https://tchain.api.btc.com/v3/address/msktiyDsycn4xeXUwVRCUeVJGiRQPxZw8j

Is there smth wrong with endpoint or address for testnet were not updated in npm?

@asnikitin
Copy link

hi
when i looked at console.log(error) near node_modules/blocktrail-sdk/lib/request.js:169 i saw

error:
      { Error: cannot GET /v1/tBTC/wallet/test?api_key=<removed key> (403)
          at Response.toError (/app/node_modules/superagent/lib/node/response.js:94:15)
          at ResponseBase._setStatusProperties (/app/node_modules/superagent/lib/response-base.js:123:16)
          at new Response (/app/node_modules/superagent/lib/node/response.js:41:8)
          at Request._emitResponse (/app/node_modules/superagent/lib/node/index.js:752:20)
          at Stream.parser (/app/node_modules/superagent/lib/node/index.js:916:38)
          at Stream.emit (events.js:193:13)
          at Unzip.unzip.on (/app/node_modules/superagent/lib/node/unzip.js:55:12)
          at Unzip.emit (events.js:198:15)
          at endReadableNT (_stream_readable.js:1139:12)
          at processTicksAndRejections (internal/process/task_queues.js:81:17)
        status: 403,
        text: 'banned [<removed IP>]\n',
        method: 'GET',
        path:
         '/v1/tBTC/wallet/test?api_key=<removed key>' },

and the next point ask [email protected] for remove IP from ban list

@lacksfish
Copy link
Contributor

@asnikitin Seems you are banned. Make use of a different IP address or contact the email address you mentioned and include your IP address.

Perhaps you've been hammering the API with requests too frequently?

@jiangjinyuan
Copy link
Contributor

Have exactly the same issue... As I found in code the endpoint starts with tchain for testnet instead of just chain. I've tried the GET request via browser and found that endpoint for mainnet is available

https://chain.api.btc.com/v3/address/136xuuzNXs4yQoPWUhpQGHBUb2Wv2iVyKG
while the same for testnet doesn't:
https://tchain.api.btc.com/v3/address/msktiyDsycn4xeXUwVRCUeVJGiRQPxZw8j

Is there smth wrong with endpoint or address for testnet were not updated in npm?

The API of the testnet has been suspended for maintenance..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants