techtailor / laravel-binance-api Goto Github PK
View Code? Open in Web Editor NEWA Laravel Wrapper for the Binance API. Now easily connect and consume the Binance Public & Private API in your Laravel apps without any hassle.
License: MIT License
A Laravel Wrapper for the Binance API. Now easily connect and consume the Binance Public & Private API in your Laravel apps without any hassle.
License: MIT License
I not see open order method and stoploss , trailing stop method in your API.
How can do that
Hello I need to create new order function with your class.
I tried that but its not work for me
`
/**
* Create a new order.
*
* @throws Exception
*
* @param string $symbol Exchange Pair Symbol
* @param string $side Order side (BUY or SELL)
* @param string $type Order type (LIMIT, MARKET, STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT, LIMIT_MAKER)
* @param string $timeInForce (GTC, IOC)
* @param float $quantity Order quantity
* @param float $price Order price
* @param float $stopPrice (for STOP_LOSS and TAKE_PROFIT orders)
* @param float $icebergQty (for LIMIT orders)
* @param float $newOrderResprice (for STOP_LOSS and TAKE_PROFIT orders)
* @param float $newOrderResptime (for STOP_LOSS and TAKE_PROFIT orders)
* @param string $recvWindow (optional)
* @param string $timing (optional)
*
* @return mixed
*/
// public function createOrder($symbol, $side, $type, $timeInForce, $quantity, $price, $stopPrice = null, $icebergQty = null, $newOrderResprice = null, $newOrderResptime = null, $recvWindow = null, $timing = null)
public function createOrder()
{
$data = [
// 'symbol' => $symbol ? strtoupper($symbol) : null,
// 'side' => $side ? strtoupper($side) : null,
// 'type' => $type ? strtoupper($type) : null,
// 'timeInForce' => $timeInForce ? strtoupper($timeInForce) : null,
// 'quantity' => $quantity ? $quantity : null,
// 'price' => $price ? $price : null,
// 'stopPrice' => $stopPrice ? $stopPrice : null,
// 'icebergQty' => $icebergQty ? $icebergQty : null,
// 'newOrderResprice' => $newOrderResprice ? $newOrderResprice : null,
// 'newOrderResptime' => $newOrderResptime ? $newOrderResptime : null,
// 'recvWindow' => $recvWindow ? $recvWindow : $this->recvWindow,
// 'timestamp' => $this->milliseconds(),
'symbol' => 'BNBUSDT',
'side' => 'BUY',
'type' => 'LIMIT',
'timeInForce' => 'GTC',
'quantity' => "1",
'price' => "41",
];
$response = $this->privateRequest('v3/order', $data, 'POST');
return $response;
}
error is :
array:3 [โผ
"code" => "-1104"
"error" => "INVALID_REQUEST"
"message" => "Not all sent parameters were read; read 1 parameter(s) but was sent 2."
]
`
Can you help me about it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.