From 496726e349933997c28f4108de9581999723170c Mon Sep 17 00:00:00 2001 From: Mohamed Ali Date: Fri, 3 Jun 2022 05:59:02 +0300 Subject: [PATCH 1/2] Binance Pay History --- php-binance-api.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/php-binance-api.php b/php-binance-api.php index 2b2d330..dfe150a 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -3078,4 +3078,22 @@ public function bswapQuote($baseAsset, $quoteAsset, $quoteQty) { return $this->httpRequest("v1/bswap/quote", 'GET', $opt, true); } + + /** + * payHistory - get Binance Pay transactions. + * + * @property int $limit + * + * @return array containing the response + * @throws \Exception + */ + public function payHistory($limit) + { + $opt = [ + 'sapi' => true, + 'limit' => $limit + ]; + + return $this->httpRequest("v1/pay/transactions", 'GET', $opt, true); + } } From c1a99c81d55e520f43af8ff161ab96ef339ec7a7 Mon Sep 17 00:00:00 2001 From: Mohamed Ali Date: Sun, 19 Jun 2022 19:44:57 +0300 Subject: [PATCH 2/2] Transfer from a wallet to another --- php-binance-api.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/php-binance-api.php b/php-binance-api.php index dfe150a..b293b04 100755 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -3096,4 +3096,26 @@ public function payHistory($limit) return $this->httpRequest("v1/pay/transactions", 'GET', $opt, true); } + + /** + * transfer - transfer coins from wallet to another. + * + * @property string $asset + * @property float $amount + * @property string $type (ex: FUNDING_MAIN: funding to mail wallet, MAIN_FUNDING: main to funding wallet) + * + * @return array containing the response + * @throws \Exception + */ + public function transfer($asset, $amount, $type) + { + $opt = [ + 'sapi' => true, + 'type' => $type, + 'asset' => $asset, + 'amount' => $amount, + ]; + + return $this->httpRequest("v1/asset/transfer", 'POST', $opt, true); + } }