Comments (11)
Error I have is
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: GET https://api.coinbase.com/v2/accounts
resulted in a 404 Not Found
response:
{"errors":[{"id":"not_found","message":"Account not found"}]}
from phptrader.
Have confirmed API Key and secret are in config and active on coinbase.
from phptrader.
If I use V1 Key set to "all".
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: GET https://api.coinbase.com/v2/accounts
resulted in a 403 Forbidden
response:
{"errors":[{"id":"invalid_scope","message":"API Key does not support wallet:accounts:read scopes","url":"https://develop (truncated...)
from phptrader.
It's definitely an API mismatch. Enable all V2 and V1 coinbase options and it's talking to V2 while using V1. I think you could specify the API version to use in the request but that's one of the composer dependencies?
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: GET https://api.coinbase.com/v2/accounts
resulted in a 403 Forbidden
response:
{"errors":[{"id":"invalid_scope","message":"Scopes don't match current API version.","url":"https://developers.coinbase. (truncated...)
' in /home/pi/phptrader/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
API version is generally passed as a CB-VERSION header. If the API version is omitted, the version displayed below will be used.
API Version: 2017-04-18 YOU'RE UP-TO-DATE
from phptrader.
Related: coinbase/coinbase-php#114
from phptrader.
Alright we will figure this out. I only enabled the V2 API for the key I used, didn't even expand the V1 info in the dialogue.
- When does this error occur? When buying, when selling or in the watchdog?
- Did you enable your API key for all wallets?
- Did you rename any of your wallets? The script looks for "EUR Wallet" or "USD Wallet" by hand so if the name is off, it can't find it
from phptrader.
It happens with
php trader.php buy 10 2
Gave access to all wallets. Have not renamed any. I'm in the UK so I have a GBP and EUR wallet if that makes a difference.
from phptrader.
PHP Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `GET https://api.coinbase.com/v2/accounts` resulted in a `404 Not Found` response:
{"errors":[{"id":"not_found","message":"Account not found"}]}
' in /home/pi/phptrader/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
Stack trace:
#0 /home/pi/phptrader/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/pi/phptrader/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /home/pi/phptrader/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /home/pi/phptrader/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /home/pi/phptrader/vendor/guzzlehttp/promises/src/Promise.php(246): Gu in /home/pi/phptrader/vendor/coinbase/coinbase/src/Exception/HttpException.php on line 37
from phptrader.
<?php
// The currency you're going to pay with when buying new coins
// This can also be a crypto currency you have on Coinbase
// EUR or USD or even ETH or BTC
define('CURRENCY','EUR');
// The crypto currency the bot is going to trade.
// BTC or ETH only the moment
define('CRYPTO','BTC');
// Script settings
define('DEV',true); //enables the program output
define('SIMULATE',true); //if false, transactions are really paid, else it's just a simulation
//how long between price checks in the watchdog?
define('SLEEPTIME',10);
// chat system output (rocket.chat and Slack supported)
define('ROCKETCHAT_REPORTING',false); //enables/disables rocketchat reporting
define('ROCKETCHAT_WEBHOOK',''); // The URL of the webhook. Also works with a Slack webhook!
// Coinbase
//define('COINBASE_KEY','<removed>');
//define('COINBASE_SECRET','<removed>');
define('COINBASE_KEY','<removed>');
define('COINBASE_SECRET','<removed>');
// REDIS for storing your data (bitcoin prices, orders, etc)
// if REDIS_SERVER is not set, will use a local JSON file
// if the JSON file is present AND REDIS_SERVER is set, will convert to redis and delete JSON
define('REDIS_SERVER', '');
define('REDIS_PORT', 6379);
define('REDIS_PASS','');
define('REDIS_DB',0);
from phptrader.
upgrade to the latest version that might fix it since the code is now looking for the wallets by currency rather by name like in the old version.
If the bug still persists, please send the first few lines from the debug output of /var/log/phptrader.log
from phptrader.
Thanks git pull to recent version and a new API key and it's working.
from phptrader.
Related Issues (14)
- Keep getting Invalid Signature error when getting accounts HOT 1
- Undefined index in ptrader.php HOT 7
- Log Permissions Not Allowing Script To Run HOT 1
- Announcement: PHPtrader won't be maintaned any more, I'm making a better one HOT 2
- Coinbase API error v2 HOT 1
- Rounding issue
- Can't set the timezone before config has loaded
- Code redundancy
- Missing data in new List command HOT 1
- Logs can get HUGE HOT 2
- Undefined index btc when running watchdog HOT 1
- [ERR] Could not find your BTC Wallet. Do you have one on Coinbase? HOT 1
- Real buy amount is not the same with the input amount HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phptrader.