This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a589ff9
commit 4b88001
Showing
3 changed files
with
68 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php namespace Alpaca\Account; | ||
|
||
class Activity | ||
{ | ||
|
||
/** | ||
* Response array | ||
* | ||
* @var Alpaca\Alpaca | ||
*/ | ||
private $alpaca; | ||
|
||
/** | ||
* __construct | ||
* | ||
*/ | ||
public function __construct(\Alpaca\Alpaca $alpaca) | ||
{ | ||
$this->alpaca = $alpaca; | ||
} | ||
|
||
/** | ||
* get() | ||
* | ||
* @return array | ||
*/ | ||
public function get($type, $options=[]) | ||
{ | ||
return $this->alpaca->request('activity',array_merge(['type'=>$type],$options))->contents(); | ||
} | ||
|
||
/** | ||
* getFilledOrders() | ||
* | ||
* @return array | ||
*/ | ||
public function getFilledOrders($from, $to, $options = []) | ||
{ | ||
return $this->get('FILL',array_merge(['after'=>$from,'until'=>$to],$options)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters