Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
KerryJones committed Jul 28, 2024
1 parent c8a45f2 commit 1126273
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.6.0-beta

Added universal parameters to all endpoints with the ability to change format to CSV and HTML (beta).

## v0.5.0-beta

Added indices->quotes to parallelize and speed up multiple index quotes.
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ $status = $client->utilities->api_status();
$headers = $client->utilities->headers();
```

### Universal Parameters

All endpoints (other than utilities) supports universal parameters.

For instance, you can change the format to CSV

```
$option_chain = $client->options->option_chain(
symbol: 'AAPL',
expiration: '2025-01-17',
side: Side::CALL,
parameters: new Parameters(format: Format::CSV),
);
```

## Testing

```bash
Expand Down
2 changes: 1 addition & 1 deletion src/ClientBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function async($method, array $arguments = []): PromiseInterface
* @throws GuzzleException
* @throws ApiException
*/
public function execute($method, array $arguments = []): object
public function execute($method, array $arguments = ['format' => 'json']): object
{
try {
$response = $this->guzzle->get($method, [
Expand Down

0 comments on commit 1126273

Please sign in to comment.