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

Getting transaction details #116

Open
francescopepe opened this issue Apr 18, 2018 · 13 comments
Open

Getting transaction details #116

francescopepe opened this issue Apr 18, 2018 · 13 comments

Comments

@francescopepe
Copy link

Ehy there,
I'm trying to get transaction details with method ->transaction() but I get UnknownEndpointSpecificError. In the method the client sends 2 different requests to the server, the first one with "?verbose=3" and the second one without it. The first one works but the second one obtains an error 403 with empty body.
If I put usleep(100 * 1000) between the 2 requests everything works. It's clearly due to the server endpoint.

What is happening with the server APIs?

@n0n0n0n0
Copy link

It was moved to btc.com and now has TONS OF PROBLEMS.

@lacksfish
Copy link

Which version of the SDK are you using? Can you share a code snippet of where in your code you receive the 403?

@francescopepe
Copy link
Author

It seems it doesn't happen anymore. Probabily it was related to the migration to btc.com

@francescopepe
Copy link
Author

francescopepe commented May 11, 2018

Ehy there! The same error came out again :(

I'm using the SDK 3.2.2. Here's the snippet:

$client = new BlocktrailSDK( "*******","*******"); $transaction = $client->transaction('<id>');

I get this error:
image

The error is thrown in blocktrail\blocktrail-sdk\src\BlocktrailSDK.php

I added usleep() below and If I uncomment it no error comes out.
image

here there is the response I get debugging it (of course without usleep):
image

Thx

@francescopepe francescopepe reopened this May 11, 2018
@n0n0n0n0
Copy link

Looks like ratelimit on server side

@francescopepe
Copy link
Author

It seems so. Who should fix this? xD

@n0n0n0n0
Copy link

i'm waiting for fixes since update, so be patient :D

@RishabSwift
Copy link

Any fixes yet? It's almost going to be 2 months.

@francescopepe
Copy link
Author

Nothing yet, I always need to put usleep for now.

@Glebsky
Copy link

Glebsky commented Jan 29, 2019

it works for me if
public function transaction($txhash) {
usleep(150 * 5000);
$response = $this->dataClient->get($this->converter->getUrlForTransaction($txhash));
$res = $this->converter->convertTx($response->body(), null);
usleep(150 * 5000);
if ($this->converter instanceof BtccomConverter) {
$res['raw'] = \json_decode($this->dataClient->get("tx/{$txhash}/raw")->body(), true)['data'];
}

    return $res;
}

@n0n0n0n0
Copy link

it should work w/o usleep

@Glebsky
Copy link

Glebsky commented Jan 29, 2019

since
since2
not working for me

@francescopepe
Copy link
Author

You have to use usleep for now. It seems it's not fixed yet :(.

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