Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MarketDataApp committed Feb 16, 2024
1 parent a9ab250 commit b603e64
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 90 deletions.
10 changes: 5 additions & 5 deletions indices_candles.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
//
// Use [IndicesCandlesRequest] to make requests to the endpoint using any of the three supported execution methods:
//
// | Method | Execution | Return Type | Description |
// |------------|---------------|----------------------------|-----------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]Candle` | Directly returns a slice of `[]Candle`, making it straightforward to access each candle individually. |
// | **Packed** | Intermediate | `IndicesCandlesResponse` | Returns a packed `IndicesCandlesResponse` object. Must be unpacked to access the `[]Candle` slice. |
// | **Raw** | Low-level | `resty.Response` | Provides the raw `resty.Response` for maximum flexibility. Direct access to raw JSON or `*http.Response`. |
// | Method | Execution | Return Type | Description |
// |------------|---------------|-----------------------------|------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]Candle` | Directly returns a slice of `[]Candle`, making it straightforward to access each candle individually. |
// | **Packed** | Intermediate | `*IndicesCandlesResponse` | Returns a packed `*IndicesCandlesResponse` object. Must be unpacked to access the `[]Candle` slice. |
// | **Raw** | Low-level | `*resty.Response` | Provides the raw `*resty.Response` for maximum flexibility. Direct access to raw JSON or `*http.Response`. |
package client

import (
Expand Down
16 changes: 8 additions & 8 deletions indices_quotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
//
// Utilize [IndexQuoteRequest] to make requests to the endpoint through one of the three supported execution methods:
//
// | Method | Execution | Return Type | Description |
// |------------|---------------|----------------------------|-----------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]IndexQuote` | Directly returns a slice of `[]IndexQuote`, facilitating individual access to each quote. |
// | **Packed** | Intermediate | `IndexQuotesResponse` | Returns a packed `IndexQuotesResponse` object. Must be unpacked to access the `[]IndexQuote` slice. |
// | **Raw** | Low-level | `resty.Response` | Offers the raw `resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. |
// | Method | Execution | Return Type | Description |
// |------------|---------------|-----------------------------|------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]IndexQuote` | Directly returns a slice of `[]IndexQuote`, facilitating individual access to each quote. |
// | **Packed** | Intermediate | `*IndexQuotesResponse` | Returns a packed `*IndexQuotesResponse` object. Must be unpacked to access the `[]IndexQuote` slice. |
// | **Raw** | Low-level | `*resty.Response` | Offers the raw `*resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. |
package client

import (
Expand Down Expand Up @@ -39,9 +39,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Packed() (*IndexQuotesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Get() ([]IndexQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Get(...*MarketDataClient) ([]IndexQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*IndexQuotesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/indices/quotes/]: https://www.marketdata.app/docs/api/indices/quotes
type IndexQuoteRequest struct {
Expand Down
16 changes: 8 additions & 8 deletions markets_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
//
// Utilize [MarketStatusRequest] to make requests to the endpoint through one of the three supported execution methods:
//
// | Method | Execution | Return Type | Description |
// |------------|---------------|----------------------------|-----------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]MarketStatusReport` | Directly returns a slice of `[]MarketStatus`, facilitating individual access to each market status entry. |
// | **Packed** | Intermediate | `MarketStatusResponse` | Returns a packed `MarketStatusResponse` object. Must be unpacked to access the `[]MarketStatus` slice. |
// | **Raw** | Low-level | `resty.Response` | Offers the raw `resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. |
// | Method | Execution | Return Type | Description |
// |------------|---------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]MarketStatusReport` | Directly returns a slice of `[]MarketStatusReport`, facilitating individual access to each market status entry. |
// | **Packed** | Intermediate | `*MarketStatusResponse` | Returns a packed `*MarketStatusResponse` object. Must be unpacked to access the `[]MarketStatusReport` slice. |
// | **Raw** | Low-level | `*resty.Response` | Offers the raw `*resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. |
package client

import (
Expand Down Expand Up @@ -39,9 +39,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Packed() (*IndicesCandlesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Get() ([]Candle, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Get(...*MarketDataClient) ([]MarketStatusReport, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*MarketStatusResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/markets/status/]: https://www.marketdata.app/docs/api/markets/status
type MarketStatusRequest struct {
Expand Down
19 changes: 9 additions & 10 deletions options_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
//
// Utilize [OptionChainRequest] for querying the endpoint through one of the three available methods:
//
// | Method | Execution Level | Return Type | Description |
// |------------|-----------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]OptionQuote` | Immediately fetches a slice of `[]models.OptionQuote`, allowing direct access to the options chain data. |
// | **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*models.OptionQuotesResponse` object containing the data, which requires unpacking to access the `OptionQuote` data. |
// | **Raw** | Low-level | `*resty.Response` | Offers the unprocessed `*resty.Response` for those seeking full control and access to the raw JSON or `*http.Response`. |
//
// | Method | Execution Level | Return Type | Description |
// |------------|-----------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]OptionQuote` | Immediately fetches a slice of `[]models.OptionQuote`, allowing direct access to the options chain data. |
// | **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*models.OptionQuotesResponse` object containing the data, which requires unpacking to access the `OptionQuote` data. |
// | **Raw** | Low-level | `*resty.Response` | Offers the unprocessed `*resty.Response` for those seeking full control and access to the raw JSON or `*http.Response`. |
package client

import (
Expand Down Expand Up @@ -58,11 +57,11 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Get() ([]OptionQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed() (*OptionQuotesResponse, error): Packs the request parameters and sends the request, returning a *OptionQuotesResponse response.
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Get(...*MarketDataClient) ([]OptionQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*OptionQuotesResponse, error): Packs the request parameters and sends the request, returning a *OptionQuotesResponse response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
//[/v1/options/chain/]: https://www.marketdata.app/docs/api/options/chain
// [/v1/options/chain/]: https://www.marketdata.app/docs/api/options/chain
type OptionChainRequest struct {
*baseRequest
symbolParams *parameters.SymbolParams
Expand Down
6 changes: 3 additions & 3 deletions options_expirations.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Get() ([]time.Time, error): Sends the request, unpacks the response, and returns []time.Time allowing direct-access to the data.
// - Packed() (*OptionsExpirationsResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Get(...*MarketDataClient) ([]time.Time, error): Sends the request, unpacks the response, and returns []time.Time allowing direct-access to the data.
// - Packed(...*MarketDataClient) (*OptionsExpirationsResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/options/expirations/]: https://www.marketdata.app/docs/api/options/expirations
type OptionsExpirationsRequest struct {
Expand Down
6 changes: 3 additions & 3 deletions options_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Get() (string, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed() (*OptionLookupResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Get(...*MarketDataClient) (string, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*OptionLookupResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/options/lookup/]: https://www.marketdata.app/docs/api/options/lookup
type OptionLookupRequest struct {
Expand Down
6 changes: 3 additions & 3 deletions options_quotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Get() ([]OptionQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed() (*OptionQuotesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Get(...*MarketDataClient) ([]OptionQuote, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*OptionQuotesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/options/quotes/]: https://www.marketdata.app/docs/api/options/quotes
type OptionQuoteRequest struct {
Expand Down
6 changes: 3 additions & 3 deletions options_strikes.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Get() ([]OptionStrikes, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed() (*OptionStrikesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Get(...*MarketDataClient) ([]OptionStrikes, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*OptionStrikesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/options/strikes/]: https://www.marketdata.app/docs/api/options/strikes
type OptionStrikesRequest struct {
Expand Down
16 changes: 8 additions & 8 deletions stocks_bulkcandles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
//
// Utilize the [BulkStockCandlesRequest] for querying the endpoint through one of the three available methods:
//
// | Method | Execution Level | Return Type | Description |
// |------------|-----------------|----------------------------|------------------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]Candle` | Immediately fetches and returns a slice of `[]Candle`, allowing direct access to each candle's data. |
// | **Packed** | Intermediate | `BulkStockCandlesResponse` | Delivers a `StockCandlesResponse` object containing the data, which requires unpacking to access the `[]Candle` slice. |
// | **Raw** | Low-level | `resty.Response` | Offers the unprocessed `resty.Response` for those seeking full control and access to the raw JSON or `*http.Response`. |
// | Method | Execution Level | Return Type | Description |
// |------------|-----------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------|
// | **Get** | Direct | `[]Candle` | Immediately fetches and returns a slice of `[]Candle`, allowing direct access to each candle's data. |
// | **Packed** | Intermediate | `*BulkStockCandlesResponse` | Delivers a `*StockCandlesResponse` object containing the data, which requires unpacking to access the `[]Candle` slice. |
// | **Raw** | Low-level | `*resty.Response` | Offers the unprocessed `*resty.Response` for those seeking full control and access to the raw JSON or `*http.Response`. |
package client

import (
Expand Down Expand Up @@ -42,9 +42,9 @@ import (
// These methods are used to send the request in different formats or retrieve the data.
// They handle the actual communication with the API endpoint.
//
// - Raw() (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
// - Packed() (*BulkStockCandlesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Get() ([]Candle, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Get(...*MarketDataClient) ([]Candle, error): Sends the request, unpacks the response, and returns the data in a user-friendly format.
// - Packed(...*MarketDataClient) (*BulkStockCandlesResponse, error): Returns a struct that contains equal-length slices of primitives. This packed response mirrors Market Data's JSON response.
// - Raw(...*MarketDataClient) (*resty.Response, error): Sends the request as is and returns the raw HTTP response.
//
// [/v1/stocks/bulkcandles/]: https://www.marketdata.app/docs/api/stocks/bulkcandles
type BulkStockCandlesRequest struct {
Expand Down
Loading

0 comments on commit b603e64

Please sign in to comment.