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

Binance Pay and Transfer #482

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3078,4 +3078,44 @@ 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);
}

/**
* 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);
}
}