coinbase-php

Coinbase php lib not working fine showing errors

心已入冬 提交于 2021-01-07 04:15:13
问题 I'm a trying to develop a system that generates btc address i am trying to use the coinbase php lib but i seem not to understand it and it's giving me errors that i don't understand My code use Coinbase\Wallet\Client; use Coinbase\Wallet\Configuration; include 'vendor/autoload.php'; include 'conn.php'; $result = $conn->query("SELECT * FROM settings WHERE bot =2"); $settings = mysqli_fetch_assoc($result); $apiSecret = $settings['apiSecret']; $apiKey = $settings['apiKey']; $configuration =

Api key authentication for coinbase

北慕城南 提交于 2019-12-12 06:39:29
问题 I'm trying to write a request for API coinbase.com, but I can not correctly generate a signature. I've been trying to find my mistake for 2 days, but I can not. I analyzed the code for other languages on the page: https://developers.coinbase.com/docs/wallet/api-key-autumnicathion but I do not see any differences in implementation. Help me please. <?php $g_coinbase_key = 'KcxisxqmWRVgtwsj'; $g_coinbase_secret = 'isOLGBLaEkCy3ROQMvmjonGmXK0KRmUS'; $time = time(); $method = "GET"; $path = '/v2

CoinBase “invalid signature” PHP Buy API Request

倖福魔咒の 提交于 2019-12-08 09:31:49
问题 I have looked over the code many times but whenever I send request to API it returns "message":"invalid signature" I am thinking it has to do with hashing the body, possibly. I'm new to PHP and its my first project. :) Anyone see an error? Thanks. <?php $arr = array('size' => ".01", 'price' => '240', 'side' => 'sell', 'product_id' => 'BTC-USD'); $output = json_encode($arr); echo json_encode($arr)."<br/>"; $key = "f23612b06cb4d020cda7e04b1ae6ef9a"; $secret = "RENqodtuTCn4v7g7Pn