devstar / alpaca-broker-php-sdk
There is no license information available for the latest version (v1.0.2) of this package.
PHP SDK for the Alpaca Broker API
v1.0.2
2023-02-14 23:04 UTC
Requires
- php: ^8.0.2
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: ^9.5.10
README
It's a PHP SDK for Alpaca Broker API
Requirements
Install
composer require devstar/alpaca-broker-php-sdk
Usage
Create Alpaca Broker client
$this->alpaca = new Alpaca($key, $secret, $mode == 'pepper' ? true: false);
Open an account
$this->alpaca->account->create($params);
Search all assets
$this->alpaca->asset->getAssetsAll();
Create an order
$this->alpaca->trade->createOrder($account_id, $params);
Transfer
$this->alpaca->funding->createTransferEntity($account_id, $params);
Document upload
$this->alpaca->document->upload($account_id, $params);