This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
6
{
7
/**
8
* Determine if the request need authorized.
9
*
10
* @var bool
11
*/
12
protected $authorize = true;
13
14
/**
15
* Get the request url.
16
*
17
* @return string
18
*/
19
public function getUrl()
20
{
21
return parent::getUrl().'v3/order';
22
}
23
24
/**
25
* Get the request method.
26
*
27
* @return string
28
*/
29
public function getMethod()
30
{
31
return 'POST';
32
}
33
34
/**
35
* Get the request data.
36
*
37
* @return array
38
*/
39
public function getData()
40
{
41
return [
42
'symbol' => $this->params['symbol'],
43
'side' => 'BUY',
44
'type' => 'LIMIT',
45
'timeInForce' => 'GTC',
46
'quantity' => $this->params['amount'],
47
'price' => $this->params['price'],
48
];
49
}
50
51
/**
52
* Map the given array to create a response object.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.