diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 05559207..dda1380b 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -5,6 +5,18 @@ on: branches: [main] jobs: + table-alignment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Check markdown table alignment + run: node scripts/fix-table-alignment.js + worker-unit-tests: runs-on: ubuntu-latest steps: diff --git a/account/billing-portal.md b/account/billing-portal.md index e083addc..bc0404fd 100644 --- a/account/billing-portal.md +++ b/account/billing-portal.md @@ -1,12 +1,16 @@ --- title: Billing Portal -sidebar_position: 10 +sidebar_position: 6 --- For heightened security, Market Data uses an independent third-party billing system to process your transactions. We do not store your credit card information and we do not have access to your billing details. Customers can manage their own subscriptions and billing details via the [Billing Portal](https://cc.payproglobal.com/Customer/Account/Login). ## How to Access the Billing Portal for the First Time +:::note +The Billing Portal is only available to **paid customers**. A billing portal account is created automatically when you make your first purchase. If you have a free or trial account and want to subscribe, you can do so directly from the Market Data [Customer Dashboard](https://www.marketdata.app/dashboard/). +::: + To access your billing information for the first time, follow these steps: 1. Visit the [Billing Portal](https://cc.payproglobal.com/Customer/Account/Login). diff --git a/account/cancellations.md b/account/cancellations.md index 6c11e50f..40191e9b 100644 --- a/account/cancellations.md +++ b/account/cancellations.md @@ -1,6 +1,6 @@ --- title: Cancellations -sidebar_position: 11 +sidebar_position: 8 --- Your Market Data account can be cancelled at any time. diff --git a/account/compliance.md b/account/compliance.md deleted file mode 100644 index 88f48c62..00000000 --- a/account/compliance.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Account Compliance -sidebar_position: 10 ---- - -Exchange regulations require us to collect a broad range of information from all users for the purpose of account verification and compliance. Market Data is committed to protecting your privacy and will only use this information to verify your account and comply with these exchange regulations. - -Please be aware that we are required to share this information with the exchanges, and they regularly review this information for accuracy. - -## Our Commitment to Your Privacy - -We understand that providing personal information can feel intrusive, and we want to assure you that we take your privacy seriously. The information we collect is strictly for compliance with exchange regulations. We apologize for any inconvenience this may cause and appreciate your understanding and cooperation. - -We are committed to using your information responsibly and only for the purposes outlined in this document. We do not sell or share your information with third parties beyond what is required by the exchanges. - -## Information We Collect - -| Contact Information | Employer Information | -|---------------------|----------------------| -| Name | Company Name | -| Address | Address | -| Email | Job Title | -| Phone Number | LinkedIn Profile URL | - -Customers employed by banks, insurance companies, or other financial institutions are required to undergo a more thorough review process. - -## Verification Process - -On sign-up, we will review your account profile and verify the information you provided to us matches third-party databases such as LinkedIn. We will also review FINRA BrokerCheck to determine if you hold any active securities licenses. The goal of this process is to classify your data use as either a professional or non-professional data user. - -Profiles that are missing contact or employer information will not be classified until all the information is provided. By providing _all required information_, you allow us to complete the verification process quickly and fully activate your account. Until the verification process is complete, your account cannot be activated for real-time data. - -### Missing or Mismatching Information - -We cannot activate your service if your account profile contains missing, incomplete, or mismatched information. All fields are required, and they must match third-party databases. - -### Verification Timeframe - -We will review your account profile and verify the information you provided to us within 1 business day of you providing the information. If there are any delays, we will notify you promptly. - -### Verification Documents - -If a customer's account profile contains missing or mismatched information, we will request additional documents to verify the information. - -## Annual Review - -Once per year, we will ask you to review your account profile and verify that the information is still correct. You can do this by logging into your account and clicking the pop-up dialog that will appear after one year has passed since your last verification. - -If nothing has changed, you can click the button to confirm that the information is still correct. If something has changed, simply update the information and click the submit button to confirm the changes. \ No newline at end of file diff --git a/account/data-policies/account-verification.md b/account/data-policies/account-verification.md new file mode 100644 index 00000000..f24c2e0f --- /dev/null +++ b/account/data-policies/account-verification.md @@ -0,0 +1,43 @@ +--- +title: Account Verification Policy +sidebar_position: 6 +--- + +Market Data verifies the identity and employment information of all paid subscribers. This is a requirement of the exchanges whose data we distribute: before we can activate real-time data on an account, we must classify the subscriber as either a professional or non-professional user and certify that classification to the exchange. + +See [Professional Status Policy](/docs/account/data-policies/professional-status/) for details on what the classifications mean and the consequences of misclassification. + +## Information We Collect + +| Contact Information | Employer Information | +|---------------------|----------------------| +| Name | Company Name | +| Address | Address | +| Email | Job Title | +| Phone Number | LinkedIn Profile URL | + +Subscribers employed by banks, insurance companies, or other financial institutions are subject to a more thorough review. + +## Verification Process + +After sign-up, we verify that the information you provided matches third-party databases, including LinkedIn. We also review FINRA BrokerCheck to determine whether you hold any active securities licenses. The outcome of this review determines your professional or non-professional classification. + +Profiles with missing or incomplete information cannot be classified. Your account will not be activated for real-time data until verification is complete. + +### Missing or Mismatching Information + +All fields are required and must match third-party databases. If your profile contains missing, incomplete, or mismatched information, we will request additional documentation — such as a CV, employment letter, or other materials that clarify your job function. + +### Verification Timeframe + +We will complete verification within 1 business day of you providing the required information. + +## Annual Review + +Once per year, we will ask you to confirm that your information is still accurate. You can do this by logging into your account and responding to the prompt that appears after one year has passed since your last verification. + +If your employment or professional registration has changed in a way that affects your classification, you are required to update your information and notify us. See [Professional Status Policy](/docs/account/data-policies/professional-status/) for more details. + +## Privacy + +The information we collect is used solely to verify your account and comply with exchange regulations. We do not sell your information to third parties. We are required to share it with the exchanges, who review it periodically for accuracy. diff --git a/account/data-policies/data-redistribution.md b/account/data-policies/data-redistribution.md new file mode 100644 index 00000000..653df286 --- /dev/null +++ b/account/data-policies/data-redistribution.md @@ -0,0 +1,27 @@ +--- +title: Data Redistribution Policy +sidebar_position: 5 +--- + +Market Data's self-service plans are personal licenses that allow you to access and use market data for your own purposes only. Redistribution of that data — in any form — is not permitted under these plans. + +## What Counts as Redistribution + +Redistribution includes any method of making Market Data's data available to others, including: + +- Selling, reselling, or retransmitting data to third parties +- Exposing data through your own API or data feed +- Distributing data in bulk export files shared with others +- Sharing API access or account credentials with other users +- Embedding live or recent data in a product or service accessible to others +- Sharing a spreadsheet or workspace that pulls live data from Market Data with collaborators + +The single-IP restriction is one enforcement mechanism for this policy. See [Single IP Address Policy](/docs/account/data-policies/single-ip/) for details. + +## Commercial Redistribution + +Redistribution is permitted, but it requires a license granted directly by the exchanges — not by Market Data. Market Data cannot authorize redistribution on behalf of an exchange. If your use case involves distributing data to others, contact our sales team and we will connect you with the appropriate exchanges to get the required licenses in place. + +## Violations + +Redistribution of market data without a commercial license is a breach of your exchange agreements and Market Data's [Terms of Service](https://www.marketdata.app/terms/), and will result in immediate account termination. diff --git a/account/data-policies/exchange-agreements.md b/account/data-policies/exchange-agreements.md new file mode 100644 index 00000000..daaca746 --- /dev/null +++ b/account/data-policies/exchange-agreements.md @@ -0,0 +1,24 @@ +--- +title: Exchange Agreements +sidebar_position: 1 +--- + +Market Data is an authorized vendor for the exchanges listed below. When you access market data through Market Data's API or other services, you agree to the subscriber agreement of each exchange whose data you receive. Your use of market data through Market Data's services is subject to Market Data's [Terms of Service](https://www.marketdata.app/terms/) and the applicable exchange agreements below. + +## UTP Plan + +The **Unlisted Trading Privileges (UTP) Plan** provides consolidated stock market data for NASDAQ-listed securities, including quotes, last sale prices, and trade data. + +[UTP Plan Subscriber Agreement](pathname:///docs/exchange-agreements/utp-subscriber-agreement.pdf) + +## OPRA + +The **Options Price Reporting Authority (OPRA)** is the exclusive provider of consolidated options market data in the U.S., including last sale prices and current quotations for all listed options. + +[OPRA Subscriber Agreement](pathname:///docs/exchange-agreements/opra-subscriber-agreement.pdf) + +## IEX + +The **Investors Exchange (IEX)** is a registered national securities exchange providing real-time stock quotes and trade data. + +[IEX Controlled Data Recipient Agreement](pathname:///docs/exchange-agreements/iex-controlled-data-recipient-agreement.pdf) diff --git a/account/data-policies/free-accounts.md b/account/data-policies/free-accounts.md new file mode 100644 index 00000000..d0c60008 --- /dev/null +++ b/account/data-policies/free-accounts.md @@ -0,0 +1,31 @@ +--- +title: Free and Trial Account Data Policy +sidebar_position: 2 +--- + +Free Forever and trial accounts are limited to data that is at least 24 hours old. This restriction arises from two independent requirements: exchange rules on user identification and exchange rules on free trials. + +## User Identification Requirement + +Before an exchange permits a vendor to distribute real-time or intraday delayed data to a subscriber, the subscriber must be identified and their professional status determined. Free and trial account holders have not completed this process. + +Market Data is required by the exchanges to collect, verify, and report the identity of all subscribers who receive real-time or intraday data. Until your account is verified and you have signed the required [exchange agreements](/docs/account/data-policies/exchange-agreements/), Market Data can only provide data that is at least 24 hours old, which is not subject to the same identification requirements. + +See [Account Compliance](/docs/account/data-policies/account-verification/) for details on the verification process. + +## Exchange Restrictions on Free Trials + +Separately from identification requirements, the exchanges place limits on which subscribers may receive real-time or intraday data at no charge: + +- **Non-professional subscribers** are not permitted to receive real-time or intraday data through a free trial under any circumstances. +- **Professional subscribers** may be eligible for limited free trial access from some exchanges, but this is not universally permitted across all exchanges. + +Because Market Data serves a broad base of non-professional subscribers, and because free trial access to real-time or intraday data is prohibited for non-professionals regardless of plan, all free and trial accounts are limited to 24-hour delayed data. + +## Accessing Real-Time and Intraday Data + +To access real-time or 15-minute delayed data, all of the following are required: + +1. **A paid subscription** — real-time and intraday data are not available on free or trial plans. +2. **Account verification** — your identity and professional status must be confirmed by Market Data before exchange data can be enabled. See [Account Compliance](/docs/account/data-policies/account-verification/). +3. **Signed exchange agreements** — you must sign the subscriber agreement for each exchange whose data you wish to receive. See [Exchange Entitlements](/docs/account/entitlements/). diff --git a/account/data-policies/index.md b/account/data-policies/index.md new file mode 100644 index 00000000..38898a9b --- /dev/null +++ b/account/data-policies/index.md @@ -0,0 +1,15 @@ +--- +title: Data Policies +sidebar_position: 9 +--- + +Market Data distributes financial data under agreements with stock and options exchanges. These policies explain the obligations those agreements impose on subscribers and how they affect your access to data. + +## Policies + +- [Exchange Agreements](/docs/account/data-policies/exchange-agreements/) — The subscriber agreements for UTP, OPRA, and IEX that govern your use of exchange data +- [Free Accounts](/docs/account/data-policies/free-accounts/) — Why free and trial accounts are limited to 24-hour delayed data +- [Single IP Address](/docs/account/data-policies/single-ip/) — Why each account may only connect from one IP address at a time +- [Professional Status](/docs/account/data-policies/professional-status/) — Self-service plans are for non-professional subscribers only; certification and misclassification obligations +- [Data Redistribution](/docs/account/data-policies/data-redistribution/) — What you may and may not do with the data you receive, and how to obtain redistribution rights +- [Account Verification](/docs/account/data-policies/account-verification/) — Market Data's policy of verifying all paid subscriber identities and employment for exchange classification diff --git a/account/data-policies/professional-status.md b/account/data-policies/professional-status.md new file mode 100644 index 00000000..2f54940a --- /dev/null +++ b/account/data-policies/professional-status.md @@ -0,0 +1,33 @@ +--- +title: Professional Status Policy +sidebar_position: 4 +--- + +All Market Data self-service plans are available to **non-professional subscribers only**. Exchange rules require vendors to classify and certify the status of every subscriber who receives real-time market data. It is your responsibility to subscribe under the correct classification. Business use of market data is only available under a commercial plan. + +For a full explanation of how the exchanges define professional status and how to determine your own classification, see [Professional Status Explained](https://www.marketdata.app/education/stocks/professional-status-explained/). + +## Self-Certification Requirement + +After purchasing a plan, all subscribers must complete a **Data Use Interview** — a self-certification process in which you confirm that your use of market data meets the non-professional criteria set by the exchanges. Your account cannot be fully activated for real-time data until this process is complete. + +Non-professional certifications must be renewed once per year. You will be prompted to re-certify annually to confirm your status has not changed. + +## Obligation to Update Your Status + +If your employment, registration, or data use changes in a way that affects your classification, you are required to notify Market Data. Continued use of a non-professional plan after becoming a professional user is a breach of your exchange agreements and this policy. + +## Consequences of Misclassification + +If Market Data determines that a subscriber has incorrectly self-certified as non-professional: + +- The account will be reclassified as professional +- Exchange fees will be assessed retroactively from the date of the incorrect certification +- The account may be suspended or terminated without refund +- Market Data reserves the right to pursue all remedies available under the [Terms of Service](https://www.marketdata.app/terms/) + +Refunds are not available on the basis of unexpected classification outcomes. All classifications are made according to exchange rules based on the information you provide. + +## Unverified Accounts + +If Market Data is unable to confirm your non-professional status — for example, because your profile is incomplete or your information cannot be verified — your account will be restricted to delayed and historical data until verification is complete. See [Account Compliance](/docs/account/data-policies/account-verification/) for details on the verification process. diff --git a/account/data-policies/single-ip.md b/account/data-policies/single-ip.md new file mode 100644 index 00000000..b3ac3265 --- /dev/null +++ b/account/data-policies/single-ip.md @@ -0,0 +1,37 @@ +--- +title: Single IP Address Policy +sidebar_position: 3 +--- + +Each Market Data account may only access the API from one IP address at a time. This policy is a direct requirement of the exchange agreements under which Market Data distributes market data. + +## Why This Policy Exists + +The exchanges that license their data to Market Data prohibit unauthorized redistribution. When you sign an [exchange agreement](/docs/account/data-policies/exchange-agreements/), you agree to use the data solely for your own personal or business purposes and not to share or redistribute it to others. + +Allowing a single account to be used from multiple IP addresses simultaneously would make it impossible to enforce this restriction, because it would allow one subscriber to feed data to multiple people or systems at once. The single IP policy is how Market Data enforces the exchange's per-subscriber distribution rules. + +## What Is and Is Not Permitted + +**Permitted:** +- Switching from one device or IP address to another (e.g., moving from your laptop to a cloud server, or reconnecting after your IP changes) +- Using a VPN, provided requests consistently originate from a single IP at any given time + +**Not permitted:** +- Connecting simultaneously from more than one IP address +- Sharing your API token with other users +- Redistributing market data received through your account to any third party + +## How the Restriction Is Enforced + +Market Data monitors for patterns that indicate simultaneous access from multiple IP addresses. A single IP change is permitted. However, if requests alternate back and forth between two IP addresses within a five-minute window — a pattern consistent with two active devices — your account is temporarily blocked for 5 minutes. + +If your account has been blocked, see [403: Multiple IP Addresses](/docs/api/troubleshooting/multiple-ip-addresses/) for resolution steps. + +## Commercial Use and Multi-Device Access + +The single IP policy applies to all standard subscription plans. If your use case legitimately requires API access from multiple IP addresses simultaneously — for example, distributed systems or serving data to multiple users — this constitutes redistribution and requires a commercial license. Please contact sales to discuss licensing options. + +## Violations + +Attempting to circumvent this policy by sharing accounts or redistributing data will result in permanent account suspension. diff --git a/account/entitlements.md b/account/entitlements.md index 12ce61c7..052765e1 100644 --- a/account/entitlements.md +++ b/account/entitlements.md @@ -1,70 +1,35 @@ --- title: Exchange Entitlements -sidebar_position: 3 +sidebar_position: 5 --- -Market Data provides access to different types of financial data through various **exchange entitlements**. These entitlements are required by the exchanges to ensure proper data distribution and compliance. Understanding your entitlements helps you know what type of data you can access. +Exchange entitlements are permissions granted by exchanges that allow Market Data to distribute their data to you. Each entitlement requires you to sign the relevant exchange agreement and adhere to the exchange's data usage policies. -## What Are Entitlements? - -Entitlements are permissions granted by exchanges that allow Market Data to distribute their data to you. Each entitlement requires you to sign specific documentation agreeing to the exchange's terms of service and adhere to their data usage policies. - -### What Are My Obligations The Exchanges? - -When you request data from an exchange, you take on a set of responsibilities to the exchange that supplies that data. First, you must use the information only for your own business or personal purposes. You cannot sell, redistribute, or share the data with others outside your firm (or outside your immediate household if you are a non-professional individual). The exchanges also prohibit using the data for any illegal purpose or in any misleading or deceptive manner. - -The exchanges retain full ownership of the data and their intellectual property rights must be respected. You are required to take reasonable steps to keep the data secure and prevent unauthorized access. In some cases, you may be asked to provide information or allow inspection to ensure compliance with these rules. - -You are responsible for paying any applicable fees, taxes, or charges related to receiving the data. Failure to pay on time can lead to suspension or termination of access. The exchanges may also suspend or revoke your right to receive data if you breach the agreement or if regulators require it, often with little to no advance notice. - -Finally, you must accept that the data is provided “as is,” without guarantees of accuracy, timeliness, or uninterrupted service. The exchanges limit their liability for losses tied to the data, including trading losses. You also agree to indemnify them against claims or damages that arise from your misuse or violation of the agreements. +For your obligations under these agreements, see [Exchange Agreements](/docs/account/data-policies/exchange-agreements/). For restrictions on how the data may be used, see [Data Redistribution](/docs/account/data-policies/data-redistribution/). ## Available Entitlements -Market Data offers three exchange entitlements: - ### IEX Entitlement - **Data Type**: Real-time stock quotes and trades - **Exchange**: Investors Exchange (IEX) - **Benefit**: Access to real-time stock data -- **Requirement**: Signed IEX data agreement - **Plan Requirement**: Any paid Market Data plan ### UTP Entitlement - **Data Type**: Consolidated UTP data (candlesticks, quotes and trades) -- **Exchange**: Unlisted Trading Privileges (UTP) - includes NASDAQ, NYSE, and other major exchanges +- **Exchange**: Unlisted Trading Privileges (UTP) — includes NASDAQ, NYSE, and other major exchanges - **Benefit**: Access to 15-minute delayed intraday stock candles from major exchanges -- **Requirement**: Signed UTP data agreement - **Plan Requirement**: Any paid Market Data plan ### OPRA Entitlement - **Data Type**: Real-time options quotes and trades - **Exchange**: Options Price Reporting Authority (OPRA) - **Benefit**: Access to real-time options data -- **Requirement**: Signed OPRA data agreement - **Plan Requirement**: Paid Trader plan or above ## How to Get Your Entitlement -To receive your entitlement, you need to sign the appropriate exchange agreement: - 1. **Log into your account** at [Market Data Dashboard](https://dashboard.marketdata.app/marketdata/) 2. **Navigate to the Profile section** 3. **Review and sign** the required agreements for the data you need 4. **Wait for approval** (typically processed within 1 business day) - -## Professional Status Requirements - -Your access also depends on whether you're classified as a professional or non-professional user. Professional users typically receive historical exchange data regardless of entitlements, while non-professional users can also access real-time data with proper entitlements. - -Professional users typically defined as: -- Corporations or business entities -- Investment advisors -- Money managers -- Users who trade on behalf of others - -If you're unsure about your professional status, please contact our support team for clarification. - -## Need Help? - -If you have questions about entitlements or need assistance signing the required agreements, please contact our support team through the [Market Data Dashboard](https://dashboard.marketdata.app/marketdata/). diff --git a/account/feature-requests.md b/account/feature-requests.md index 73166837..5f422301 100644 --- a/account/feature-requests.md +++ b/account/feature-requests.md @@ -1,6 +1,6 @@ --- title: Feature Requests -sidebar_position: 5 +sidebar_position: 10 --- Market Data is _extremely_ customer-focused and we want our products and services to satisfy our users. Please make sure to visit our [Product Roadmap](https://roadmap.marketdata.app/) to see what we have planned along with our [Feature Request Board](https://roadmap.marketdata.app/features) to submit or upvote your own ideas. diff --git a/account/free-accounts.md b/account/free-accounts.md index 82e030bd..7b934f5d 100644 --- a/account/free-accounts.md +++ b/account/free-accounts.md @@ -6,22 +6,20 @@ sidebar_position: 4 Market Data offers two ways for users to use our service for free. We offer the "Free Forever" plan, which allows for 100 API requests per day. We also offer a free 30 day trial (no credit card required) so that users can test our services and determine which plan best meets their needs. Trial accounts work almost exactly the same as paid accounts and have the same [plan limits](/account/plan-limits). There are a few differences, however. #### Comparison Table -| Feature | Free Forever | Trial Plans | Paid Plans | -|-----------------------|--------------|-------------|-------------| -| 24 Hour Delayed Data | ✅ | ✅ | ❌ | -| 15 Minute Delayed Data | ❌ | ❌ | ✅ | -| Real-Time Data | ❌ | ❌ | ✅ | -| Standard Endpoints | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | AAPL Only | ✅ | -| Historical Data | 1 Year | 1 Year | Full Access | +| Feature | Free Forever | Trial Plans | Paid Plans | +|------------------------|--------------|-------------|-------------| +| 24 Hour Delayed Data | ✅ | ✅ | ❌ | +| 15 Minute Delayed Data | ❌ | ❌ | ✅ | +| Real-Time Data | ❌ | ❌ | ✅ | +| Standard Endpoints | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | AAPL Only | ✅ | +| Historical Data | 1 Year | 1 Year | Full Access | ## 24 Hour Delayed Data -Free Forever and trial accounts only have access to data that is delayed by at least 24 hours. Check the `date` column in the Add-on or the `updated` key in the API's JSON response to get the exact date and time of the quote data you've received. +Free Forever and trial accounts only have access to data that is delayed by at least 24 hours. Check the `date` column in the Add-on or the `updated` key in the API's JSON response to get the exact date and time of the quote data you've received. Real-time data is only available with paid subscription plans. -## Real-Time Data and Free Trials - -Free trials of real-time data are not permitted by the exchanges. As a vendor, we are required to pay exchange fees for users who receive real-time exchange data. Because of these mandatory exchange fees, we cannot offer free trials of real-time data. Real-time data is only available with paid subscription plans. +For the reasons behind this restriction, see the [Free Accounts Data Policy](/docs/account/data-policies/free-accounts/). ## Standard vs Premium Endpoints diff --git a/account/plan-limits.md b/account/plan-limits.md index 1452aa2d..68778a8b 100644 --- a/account/plan-limits.md +++ b/account/plan-limits.md @@ -1,6 +1,6 @@ --- title: Plan Limits -sidebar_position: 2 +sidebar_position: 3 --- Each Market Data plan comes with certain limitations to allow for shared use of our servers. We offer several plans with different price points depending on the quantity of data needed. @@ -11,14 +11,14 @@ Most users don't run into trouble with our limits. However, if our standard plan ## Standard Plans -| | Free Forever | Starter | Trader | Quant | Prime Plans | -|-----------------------|--------------|-----------|-----------|------------|-------------| -| Daily Credits | 100 | 10,000 | 100,000 | No Limit | No Limit | -| Per-Minute Credits | No Limit | No Limit | No Limit | 10,000 | 100,000 | -| Historical Data | 1 Year | 5 Years | No Limit | No Limit | No Limit | -| Stocks Data Type | Delayed | Real-time | Real-time | Real-time | Real-time | -| Options Data Type | Delayed | 15-minute delayed | Real-time | Real-time | Real-time | -| API Endpoints | Standard | Premium | Premium | Premium + Custom | Premium + Custom | +| | Free Forever | Starter | Trader | Quant | Prime Plans | +|--------------------|--------------|-------------------|-----------|------------------|------------------| +| Daily Credits | 100 | 10,000 | 100,000 | No Limit | No Limit | +| Per-Minute Credits | No Limit | No Limit | No Limit | 10,000 | 100,000 | +| Historical Data | 1 Year | 5 Years | No Limit | No Limit | No Limit | +| Stocks Data Type | Delayed | Real-time | Real-time | Real-time | Real-time | +| Options Data Type | Delayed | 15-minute delayed | Real-time | Real-time | Real-time | +| API Endpoints | Standard | Premium | Premium | Premium + Custom | Premium + Custom | ## Credits Each time you call the API, the system increases your credits counter. Normally each successful response consumes 1 credit. However, **if you request multiple symbols in a single API call using `stocks/quotes`, `stocks/prices`, `stocks/bulkcandles`, or `options/chain`, each symbol included in the response consumes credits**. @@ -33,13 +33,9 @@ Starter Trial and Trader Trial do not support `mode=cached`. ## Device Restrictions -To comply with exchange regulations regarding data redistribution, all plans are subject to strict device connection limits: +All plans are subject to a single IP address limit. Each account may only connect from one IP address at a time. Multiple simultaneous connections, account sharing, and data redistribution are not permitted. -- Each account may only connect from a single IP address at a time -- Multiple simultaneous connections from different devices are not permitted -- Account sharing and data redistribution are prohibited without a commercial license - -These restrictions are enforced across all plans to ensure compliance with exchange regulations that prohibit unauthorized data redistribution. Prime plans requiring multi-device access should contact sales for appropriate licensing options. +See the [Single IP Address Policy](/docs/account/data-policies/single-ip/) for details. #### Throttling diff --git a/account/plans/free-forever.md b/account/plans/free-forever.md index b902079f..76ae3666 100644 --- a/account/plans/free-forever.md +++ b/account/plans/free-forever.md @@ -25,13 +25,13 @@ While the Free Forever plan offers a great starting point, there are some limita To help you better understand the differences between our plans, here's a quick comparison: -| Feature | Free Forever | Paid Plans | -|-----------------------|--------------|-------------| -| Historical Data | 1 Year | Full Access | -| 15-Minute Delayed Data | ❌ | ✅ | -| Real-Time Data | ❌ | ✅ | -| Standard Endpoints | ✅ | ✅ | -| Premium Endpoints | ❌ | ✅ | +| Feature | Free Forever | Paid Plans | +|------------------------|--------------|-------------| +| Historical Data | 1 Year | Full Access | +| 15-Minute Delayed Data | ❌ | ✅ | +| Real-Time Data | ❌ | ✅ | +| Standard Endpoints | ✅ | ✅ | +| Premium Endpoints | ❌ | ✅ | ## Why Choose Free Forever? diff --git a/account/plans/index.mdx b/account/plans/index.mdx index 5b86cbc5..aa5c5037 100644 --- a/account/plans/index.mdx +++ b/account/plans/index.mdx @@ -1,7 +1,7 @@ --- title: Data Plans slug: /plans -sidebar_position: 5 +sidebar_position: 2 --- Market Data provides a varity of data subscriptions for users who need on-going access to Market Data. Explore the details of all our plans and decide which one is right for you. diff --git a/account/plans/prime.md b/account/plans/prime.md index 132ba6e7..affaa1a9 100644 --- a/account/plans/prime.md +++ b/account/plans/prime.md @@ -1,6 +1,6 @@ --- title: Prime Plan -sidebar_position: 6 +sidebar_position: 7 --- The **Prime Plan** is Market Data's most robust offering, designed for high-powered traders and investors who require extensive data access and customization options. This plan is tailored to meet the needs of sophisticated trading operations, offering unparalleled data access with the flexibility to handle massive volumes of API requests. Here's a comprehensive overview of the Prime Plan. @@ -25,13 +25,13 @@ The Prime Plan is designed with the highest level of access and customization in Here's how the Prime Plan compares to our other offerings: -| Feature | Free Forever | Starter | Trader | Quant | Prime | -|-----------------------|--------------|---------|---------|---------------|---------------| -| Daily API Credits | 100/day | 10,000/day | 100,000/day | Unlimited | Unlimited | -| Per Minute Rate Limit | No Limit | No Limit | No Limit | 10,000 | 100,000 | -| Real-Time Data | ❌ | ✅ | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | ✅ | ✅ | ✅ + Custom | ✅ + Custom | -| Historical Data | 1 Year | 5 Years | Full Access | Full Access | Full Access | +| Feature | Free Forever | Starter | Trader | Quant | Prime | +|-----------------------|--------------|------------|-------------|-------------|-------------| +| Daily API Credits | 100/day | 10,000/day | 100,000/day | Unlimited | Unlimited | +| Per Minute Rate Limit | No Limit | No Limit | No Limit | 10,000 | 100,000 | +| Real-Time Data | ❌ | ✅ | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | ✅ | ✅ | ✅ + Custom | ✅ + Custom | +| Historical Data | 1 Year | 5 Years | Full Access | Full Access | Full Access | ## Why Choose the Prime Plan? diff --git a/account/plans/quant.md b/account/plans/quant.md index c63708bc..cee74ab6 100644 --- a/account/plans/quant.md +++ b/account/plans/quant.md @@ -1,6 +1,6 @@ --- title: Quant Plan -sidebar_position: 5 +sidebar_position: 6 --- The **Quant Plan** is Market Data's offering designed for high-powered traders and investors who require extensive data access and customization options. This plan is tailored to meet the needs of sophisticated trading operations, offering unparalleled data access with the flexibility to handle massive volumes of API requests. Here's a comprehensive overview of the Quant Plan. @@ -25,13 +25,13 @@ The Quant Plan is designed with the highest level of access and customization in Here's how the Quant Plan compares to our other offerings: -| Feature | Free Forever | Starter | Trader | Quant | Prime | -|-----------------------|--------------|---------|---------|---------------|---------------| -| Daily API Credits | 100/day | 10,000/day | 100,000/day | Unlimited | Unlimited | -| Per Minute Rate Limit | No Limit | No Limit | No Limit | 10,000 | 100,000 | -| Real-Time Data | ❌ | ✅ | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | ✅ | ✅ | ✅ | ✅ | -| Historical Data | 1 Year | 5 Years | Full Access | Full Access | Full Access | +| Feature | Free Forever | Starter | Trader | Quant | Prime | +|-----------------------|--------------|------------|-------------|-------------|-------------| +| Daily API Credits | 100/day | 10,000/day | 100,000/day | Unlimited | Unlimited | +| Per Minute Rate Limit | No Limit | No Limit | No Limit | 10,000 | 100,000 | +| Real-Time Data | ❌ | ✅ | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | ✅ | ✅ | ✅ | ✅ | +| Historical Data | 1 Year | 5 Years | Full Access | Full Access | Full Access | ## Why Choose the Quant Plan? diff --git a/account/plans/starter-trial.md b/account/plans/starter-trial.md index 80c589a8..b1c01689 100644 --- a/account/plans/starter-trial.md +++ b/account/plans/starter-trial.md @@ -32,14 +32,14 @@ The Starter Trial Plan mirrors the full Starter Plan in terms of features, with Here's a quick comparison to help you understand the Starter Trial in relation to our other offerings: -| Feature | Free Forever | Starter Trial | Starter Plan | -|-----------------------|--------------|---------------|---------------| -| API Credits | 100 per day | 10,000 per day | 10,000 per day | -| Stock Data Delay | 24 hours | 24 hours | Real-time | -| Options Data Delay | 24 hours | 24 hours | 15 minutes | -| Historical Data | 1 Year | 1 Year | 5 Years | -| Standard Endpoints | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | AAPL Only | ✅ | +| Feature | Free Forever | Starter Trial | Starter Plan | +|--------------------|--------------|----------------|----------------| +| API Credits | 100 per day | 10,000 per day | 10,000 per day | +| Stock Data Delay | 24 hours | 24 hours | Real-time | +| Options Data Delay | 24 hours | 24 hours | 15 minutes | +| Historical Data | 1 Year | 1 Year | 5 Years | +| Standard Endpoints | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | AAPL Only | ✅ | ## Why Take A Trail of the Starter Plan? diff --git a/account/plans/starter.md b/account/plans/starter.md index 3639951d..b10e140c 100644 --- a/account/plans/starter.md +++ b/account/plans/starter.md @@ -25,14 +25,14 @@ The Starter Plan comes with several key advantages designed to support your proj To give you a clear idea of how the Starter Plan stands against our other offerings, here's a comparison: -| Feature | Free Forever | Starter Plan | Trader Plan | -|-----------------------|--------------|--------------|-------------| -| API Credits | 100 per day | 10,000 per day | 100,000 per day | -| Stock Data Delay | 24 hours | Real-time | Real-time | -| Options Data Delay | 24 hours | 15 minutes | Real-time | -| Standard Endpoints | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | ✅ | ✅ | -| Historical Data | 1 Year | 5 Years | Full Access | +| Feature | Free Forever | Starter Plan | Trader Plan | +|--------------------|--------------|----------------|-----------------| +| API Credits | 100 per day | 10,000 per day | 100,000 per day | +| Stock Data Delay | 24 hours | Real-time | Real-time | +| Options Data Delay | 24 hours | 15 minutes | Real-time | +| Standard Endpoints | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | ✅ | ✅ | +| Historical Data | 1 Year | 5 Years | Full Access | ## Why Choose the Starter Plan? diff --git a/account/plans/trader-trial.md b/account/plans/trader-trial.md index 00bddc1d..18d4b293 100644 --- a/account/plans/trader-trial.md +++ b/account/plans/trader-trial.md @@ -1,6 +1,6 @@ --- title: Trader Trial -sidebar_position: 4 +sidebar_position: 5 --- Market Data is thrilled to introduce a **30-day free trial** of our Trader Plan, no credit card required. This trial is crafted to allow users to experience the capabilities of the Trader Plan, ensuring it aligns with their high-volume data needs before making a subscription commitment. Here's an overview of what the Trader Trial Plan entails. @@ -34,14 +34,14 @@ The Trader Trial Plan offers a glimpse into the full capabilities of the Trader This comparison helps you understand the Trader Trial in relation to our other offerings: -| Feature | Free Forever | Trader Trial | Trader Plan | -|-----------------------|--------------|---------------|---------------| -| API Credits | 100 per day | 100,000 per day | 100,000 per day | -| Stock Data Delay | 24 hours | 24 hours | Real-time | -| Options Data Delay | 24 hours | 24 hours | Real-time | -| Historical Data | 1 Year | 1 Year | Full Access | -| Standard Endpoints | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | AAPL Only | ✅ | +| Feature | Free Forever | Trader Trial | Trader Plan | +|--------------------|--------------|-----------------|-----------------| +| API Credits | 100 per day | 100,000 per day | 100,000 per day | +| Stock Data Delay | 24 hours | 24 hours | Real-time | +| Options Data Delay | 24 hours | 24 hours | Real-time | +| Historical Data | 1 Year | 1 Year | Full Access | +| Standard Endpoints | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | AAPL Only | ✅ | ## Why Try the Trader Trial? diff --git a/account/plans/trader.md b/account/plans/trader.md index 34a5c46a..0df797cc 100644 --- a/account/plans/trader.md +++ b/account/plans/trader.md @@ -1,6 +1,6 @@ --- title: Trader Plan -sidebar_position: 3 +sidebar_position: 4 --- The **Trader Plan** is specifically designed for high-volume users and traders who demand the utmost from their financial data services. With an enormous allocation of API credits and access to the most comprehensive data sets available, the Trader Plan is the ultimate choice for those who need maximum performance and depth in their financial analysis. Here's what you can expect from the Trader Plan. @@ -24,14 +24,14 @@ The Trader Plan is packed with features to support the most demanding projects: Here's how the Trader Plan compares to our other offerings: -| Feature | Free Forever | Starter Plan | Trader Plan | -|-----------------------|--------------|--------------|---------------| -| API Credits | 100 per day | 10,000 per day | 100,000 per day | -| Stock Data Delay | 24 hours | Real-time | Real-time | -| Options Data Delay | 24 hours | 15 minutes | Real-time | -| Standard Endpoints | ✅ | ✅ | ✅ | -| Premium Endpoints | ❌ | ✅ | ✅ | -| Historical Data | 1 Year | 5 Years | Full Access | +| Feature | Free Forever | Starter Plan | Trader Plan | +|--------------------|--------------|----------------|-----------------| +| API Credits | 100 per day | 10,000 per day | 100,000 per day | +| Stock Data Delay | 24 hours | Real-time | Real-time | +| Options Data Delay | 24 hours | 15 minutes | Real-time | +| Standard Endpoints | ✅ | ✅ | ✅ | +| Premium Endpoints | ❌ | ✅ | ✅ | +| Historical Data | 1 Year | 5 Years | Full Access | ## Why Choose the Trader Plan? diff --git a/account/review-us.md b/account/review-us.md index ba023dec..439537f9 100644 --- a/account/review-us.md +++ b/account/review-us.md @@ -1,6 +1,6 @@ --- title: Review Us -sidebar_position: 6 +sidebar_position: 11 --- We welcome your reviews and feedback on social media and specialized software review sites. If you would like to share your experience with Market Data with the internet, please consider tagging us on social media or leaving us a review at any of the sites listed below. Thank you for spreading the word. diff --git a/account/upgrades.md b/account/upgrades.md index a1f82357..7114398a 100644 --- a/account/upgrades.md +++ b/account/upgrades.md @@ -1,6 +1,6 @@ --- title: Plan Upgrades -sidebar_position: 9 +sidebar_position: 7 --- At Market Data, we strive to make your experience with our services as seamless and positive as possible. When you decide to upgrade your plan, we ensure that your unused time is not wasted. The method we use to calculate your savings is the same, but the way you receive the credit is slightly different depending on whether you're moving from a monthly plan to an annual plan or from an annual plan to a monthly plan. Here's how we calculate and apply your unused time towards your new plan: diff --git a/api/authentication.mdx b/api/authentication.mdx index 5f88a020..cf3333ba 100644 --- a/api/authentication.mdx +++ b/api/authentication.mdx @@ -158,14 +158,6 @@ You can try stock, option, and index endpoints with several different symbols th ## IP Address Restrictions -Due to exchange regulations prohibiting data redistribution without a license, Market Data strictly enforces a single device policy. This means: +Each account may only connect from one IP address at a time. You can switch devices, but you cannot use two devices simultaneously. Back-and-forth switching between IP addresses within a 5-minute window triggers a temporary block. -1. Only one device/IP address is allowed per account at any given time -2. Multiple simultaneous connections from different devices/IP addresses are not permitted -3. Account sharing or data redistribution is strictly prohibited - -You can switch devices, such as moving from your laptop to your desktop or from your laptop to a cloud instance. You cannot use both at the same time. Market Data allows one active device/IP at a time. If we detect back-and-forth usage that looks like simultaneous access, your account will be temporarily blocked for 5 minutes. - -:::warning -Attempting to circumvent these restrictions by sharing accounts or redistributing data will result in permanent account suspension. -::: +See the [Single IP Address Policy](/docs/account/data-policies/single-ip/) for full details, or [403: Multiple IP Addresses](/docs/api/troubleshooting/multiple-ip-addresses/) if your account is blocked. diff --git a/api/options/chain.mdx b/api/options/chain.mdx index 1d27cd0d..266b9d04 100644 --- a/api/options/chain.mdx +++ b/api/options/chain.mdx @@ -433,23 +433,23 @@ The `am` and `pm` parameters are only applicable for index options such as SPX, The type of option chain data you receive depends on your user type and OPRA entitlement. This may include real-time data, 15-minute delayed data, or historical data, depending on the plan or access level. To get real-time options data, users need to sign the OPRA agreement. [Learn more about entitlements](/account/entitlements). -| User Type | OPRA Entitlement | Data Type | -|-----------|------------------|-----------| -| Non-Professional | ✅ | Real-time | -| Non-Professional | ❌ | 15-min delayed | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | OPRA Entitlement | Data Type | +|------------------|------------------|------------------------| +| Non-Professional | ✅ | Real-time | +| Non-Professional | ❌ | 15-min delayed | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | ### Pricing The cost of using the option chain API endpoint depends on the type of data you choose and your usage pattern. Here's a breakdown of the pricing: -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Real-Time Data | Per option symbol | 1 credit | -| 15m Delayed Data | Per option symbol | 1 credit | -| Cached Data | Per API call | 1 credit | -| Historical Data | Per 1000 option symbols | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|------------------|-------------------------|---------------------------| +| Real-Time Data | Per option symbol | 1 credit | +| 15m Delayed Data | Per option symbol | 1 credit | +| Cached Data | Per API call | 1 credit | +| Historical Data | Per 1000 option symbols | 1 credit | #### Examples diff --git a/api/options/expirations.mdx b/api/options/expirations.mdx index c78446e0..7ebc7b05 100644 --- a/api/options/expirations.mdx +++ b/api/options/expirations.mdx @@ -189,14 +189,14 @@ echo $expirations; This endpoint provides options expiration dates data. This endpoint does not require any exchange entitlements and is available to all users. -| User Type | Exchange Entitlement | Data Type | -|-----------|---------------------|------------| -| All Users | Not Required | Options Data | +| User Type | Exchange Entitlement | Data Type | +|-----------|----------------------|--------------| +| All Users | Not Required | Options Data | ### Pricing The cost of using the expirations API endpoint is 1 credit per API call. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Expirations Data | Per API call | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|------------------|--------------|---------------------------| +| Expirations Data | Per API call | 1 credit | diff --git a/api/options/lookup.mdx b/api/options/lookup.mdx index 342a4c66..2cf00ae3 100644 --- a/api/options/lookup.mdx +++ b/api/options/lookup.mdx @@ -142,14 +142,14 @@ echo $lookup; This endpoint provides option symbol lookup functionality. This endpoint does not require any exchange entitlements and is available to all users. -| User Type | Exchange Entitlement | Data Type | -|-----------|---------------------|------------| -| All Users | Not Required | Utility Data | +| User Type | Exchange Entitlement | Data Type | +|-----------|----------------------|--------------| +| All Users | Not Required | Utility Data | ### Pricing The cost of using the lookup API endpoint is 1 credit per API call. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Lookup Data | Per API call | 1 credit | \ No newline at end of file +| Data Type | Cost Basis | Credits Required per Unit | +|-------------|--------------|---------------------------| +| Lookup Data | Per API call | 1 credit | \ No newline at end of file diff --git a/api/options/quotes.mdx b/api/options/quotes.mdx index e8bf16e9..1c0faf35 100644 --- a/api/options/quotes.mdx +++ b/api/options/quotes.mdx @@ -281,20 +281,20 @@ Use the HTTP status code—not just the `s` field—to distinguish between inval The type of option quote data you receive depends on your user type and OPRA entitlement. This may include real-time data, 15-minute delayed data, or historical data, depending on the plan or access level. To get real-time options data, users need to sign the OPRA agreement. [Learn more about entitlements](/account/entitlements). -| User Type | OPRA Entitlement | Data Type | -|-----------|------------------|-----------| -| Non-Professional | ✅ | Real-time | -| Non-Professional | ❌ | 15-min delayed | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | OPRA Entitlement | Data Type | +|------------------|------------------|------------------------| +| Non-Professional | ✅ | Real-time | +| Non-Professional | ❌ | 15-min delayed | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | ### Pricing The cost of using the option quote API endpoint depends on the type of data you choose and your usage pattern. Here's a breakdown of the pricing: -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Real-Time Data | Per option symbol | 1 credit | -| 15m Delayed Data | Per option symbol | 1 credit | -| Historical Data | Per 1000 quotes | 1 credit | \ No newline at end of file +| Data Type | Cost Basis | Credits Required per Unit | +|------------------|-------------------|---------------------------| +| Real-Time Data | Per option symbol | 1 credit | +| 15m Delayed Data | Per option symbol | 1 credit | +| Historical Data | Per 1000 quotes | 1 credit | \ No newline at end of file diff --git a/api/options/strikes.mdx b/api/options/strikes.mdx index 3c506631..1e1670c4 100644 --- a/api/options/strikes.mdx +++ b/api/options/strikes.mdx @@ -185,14 +185,14 @@ echo $strikes; This endpoint provides options strikes data. This endpoint does not require any exchange entitlements and is available to all users. -| User Type | Exchange Entitlement | Data Type | -|-----------|---------------------|------------| -| All Users | Not Required | Options Data | +| User Type | Exchange Entitlement | Data Type | +|-----------|----------------------|--------------| +| All Users | Not Required | Options Data | ### Pricing The cost of using the strikes API endpoint is 1 credit per API call. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Strikes Data | Per API call | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|--------------|--------------|---------------------------| +| Strikes Data | Per API call | 1 credit | diff --git a/api/rate-limiting.md b/api/rate-limiting.md index 9ab4653e..c837847b 100644 --- a/api/rate-limiting.md +++ b/api/rate-limiting.md @@ -36,11 +36,11 @@ To adhere to this limit, it is advisable to implement a worker or thread pool me ## Rate Limits By Plan Different plans have specific rate limits. Free/Starter/Trader use daily limits, while Quant/Prime use per-minute limits. -| | Free Forever | Starter | Trader | Quant | Prime | -|--------------------------|--------------|-----------|-----------|------------|-------------| -| Daily API Credits | 100 | 10,000 | 100,000 | No Limit | No Limit | -| Per Minute API Credits | No Limit | No Limit | No Limit | 10,000 | 100,000 | -| Concurrent Request Limit | 50 | 50 | 50 | 50 | 50 | +| | Free Forever | Starter | Trader | Quant | Prime | +|--------------------------|--------------|----------|----------|----------|----------| +| Daily API Credits | 100 | 10,000 | 100,000 | No Limit | No Limit | +| Per Minute API Credits | No Limit | No Limit | No Limit | 10,000 | 100,000 | +| Concurrent Request Limit | 50 | 50 | 50 | 50 | 50 | #### Summary diff --git a/api/stocks/bulkcandles.mdx b/api/stocks/bulkcandles.mdx index 444e0abd..6f94dc32 100644 --- a/api/stocks/bulkcandles.mdx +++ b/api/stocks/bulkcandles.mdx @@ -201,12 +201,12 @@ echo $candles; **Real-time data is not available for this endpoint under any plan or entitlement.** The type of candle data you receive depends on your user type and UTP entitlement. This may include 15-minute delayed candles or historical candles (1 day old), depending on the plan or access level. -| User Type | UTP Entitlement | Candle Type | -|-----------|----------------|-------------| -| Non-Professional | ✅ | 15-min delayed | -| Non-Professional | ❌ | Historical (1 day old) | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | UTP Entitlement | Candle Type | +|------------------|-----------------|------------------------| +| Non-Professional | ✅ | 15-min delayed | +| Non-Professional | ❌ | Historical (1 day old) | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | :::info What are entitlements? @@ -217,8 +217,8 @@ Entitlements are permissions granted by exchanges that allow access to their dat The cost of using the bulk candles API endpoint is 1 credit per symbol returned in the response. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| 15-minute Delayed Data | Per symbol | 1 credit | -| Historical Data | Per symbol | 1 credit | -| Real-Time Data | Not available | N/A | +| Data Type | Cost Basis | Credits Required per Unit | +|------------------------|---------------|---------------------------| +| 15-minute Delayed Data | Per symbol | 1 credit | +| Historical Data | Per symbol | 1 credit | +| Real-Time Data | Not available | N/A | diff --git a/api/stocks/candles.mdx b/api/stocks/candles.mdx index a1506eef..e69bb321 100644 --- a/api/stocks/candles.mdx +++ b/api/stocks/candles.mdx @@ -234,12 +234,12 @@ There is no maximum date range limit on daily candles. When requesting intraday **Real-time data is not available for this endpoint under any plan or entitlement.** The type of candle data you receive depends on your user type and UTP entitlement. This may include 15-minute delayed candles or historical candles (1 day old), depending on the plan or access level. -| User Type | UTP Entitlement | Candle Type | -|-----------|----------------|-------------| -| Non-Professional | ✅ | 15-min delayed | -| Non-Professional | ❌ | Historical (1 day old) | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | UTP Entitlement | Candle Type | +|------------------|-----------------|------------------------| +| Non-Professional | ✅ | 15-min delayed | +| Non-Professional | ❌ | Historical (1 day old) | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | :::info What are entitlements? Entitlements are permissions granted by exchanges that allow access to their data. To get 15-minute delayed candles, non-professional users need to sign the [UTP agreement](/account/entitlements). [Learn more about entitlements](/account/entitlements). @@ -249,8 +249,8 @@ Entitlements are permissions granted by exchanges that allow access to their dat The cost of using the candle API endpoint is 1 credit per 1000 candles. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| 15-minute Delayed Data | Per 1000 candles | 1 credit | -| Historical Data | Per 1000 candles | 1 credit | -| Real-Time Data | Not available | N/A | +| Data Type | Cost Basis | Credits Required per Unit | +|------------------------|------------------|---------------------------| +| 15-minute Delayed Data | Per 1000 candles | 1 credit | +| Historical Data | Per 1000 candles | 1 credit | +| Real-Time Data | Not available | N/A | diff --git a/api/stocks/earnings.mdx b/api/stocks/earnings.mdx index 58d0c684..80b6c714 100644 --- a/api/stocks/earnings.mdx +++ b/api/stocks/earnings.mdx @@ -233,14 +233,14 @@ echo $earnings; This endpoint provides historical earnings data and future earnings calendar information. Earnings data is fundamental data that is updated after companies report their quarterly and annual results. -| User Type | Exchange Entitlement | Data Type | -|-----------|---------------------|------------| -| All Users | Not Required | Historical/Fundamental | +| User Type | Exchange Entitlement | Data Type | +|-----------|----------------------|------------------------| +| All Users | Not Required | Historical/Fundamental | ### Pricing The cost of using the earnings API endpoint is 1 credit per API call. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Earnings Data | Per API call | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|---------------|--------------|---------------------------| +| Earnings Data | Per API call | 1 credit | diff --git a/api/stocks/news.mdx b/api/stocks/news.mdx index 37fd75b5..37e34f63 100644 --- a/api/stocks/news.mdx +++ b/api/stocks/news.mdx @@ -206,14 +206,14 @@ echo $news; This endpoint provides news articles related to stocks. News data is auxiliary data that is updated as articles are published and aggregated. -| User Type | Exchange Entitlement | Data Type | -|-----------|---------------------|------------| -| All Users | Not Required | News/Auxiliary | +| User Type | Exchange Entitlement | Data Type | +|-----------|----------------------|----------------| +| All Users | Not Required | News/Auxiliary | ### Pricing The cost of using the news API endpoint is 1 credit per API call. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| News Data | Per API call | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|-----------|--------------|---------------------------| +| News Data | Per API call | 1 credit | diff --git a/api/stocks/prices.mdx b/api/stocks/prices.mdx index 7d0f57a4..3f5f33f0 100644 --- a/api/stocks/prices.mdx +++ b/api/stocks/prices.mdx @@ -226,16 +226,16 @@ You can provide the symbol(s) in one of two ways: This endpoint is available to all users and does not require any exchange entitlements. All users receive real-time prices regardless of their plan or access level. **Cached, delayed, and historical data are not available on this endpoint - only real-time prices are provided.** | User Type | Exchange Entitlement | Price Type | -|-----------|---------------------|------------| -| All Users | Not Required | Real-time | +|-----------|----------------------|------------| +| All Users | Not Required | Real-time | ### Pricing The cost of using the stock prices API endpoint is 1 credit per symbol. -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| Real-Time Data | Per symbol | 1 credit | -| Cached Data | Not available | N/A | -| Delayed Data | Not available | N/A | -| Historical Data | Not available | N/A | +| Data Type | Cost Basis | Credits Required per Unit | +|-----------------|---------------|---------------------------| +| Real-Time Data | Per symbol | 1 credit | +| Cached Data | Not available | N/A | +| Delayed Data | Not available | N/A | +| Historical Data | Not available | N/A | diff --git a/api/stocks/quotes.mdx b/api/stocks/quotes.mdx index 9204c014..7c0e24dc 100644 --- a/api/stocks/quotes.mdx +++ b/api/stocks/quotes.mdx @@ -286,12 +286,12 @@ You can provide the symbol(s) in one of two ways: The type of quote you receive depends on your user type and UTP entitlement. This may include a 15-minute delayed quote or historical (1 day old) quote, depending on the plan or access level. Real-time quotes are not currently available. -| User Type | UTP Entitlement | Quote Type | -|-----------|----------------|------------| -| Non-Professional | ✅ | 15-min delayed | -| Non-Professional | ❌ | Historical (1 day old) | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | UTP Entitlement | Quote Type | +|------------------|-----------------|------------------------| +| Non-Professional | ✅ | 15-min delayed | +| Non-Professional | ❌ | Historical (1 day old) | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | :::info What are entitlements? Entitlements are permissions granted by exchanges that allow access to their data. To get delayed quotes, users need to sign the [UTP agreement](/account/entitlements). [Learn more about entitlements](/account/entitlements). @@ -301,7 +301,7 @@ Entitlements are permissions granted by exchanges that allow access to their dat The cost of using the stock quote API endpoint depends on the type of data you choose and your usage pattern. Here's a breakdown of the pricing: -| Data Type | Cost Basis | Credits Required per Unit | -|--------------------|---------------------------|---------------------------| -| 15m Delayed Data | Per symbol | 1 credit | -| Historical Data | Per symbol | 1 credit | +| Data Type | Cost Basis | Credits Required per Unit | +|------------------|------------|---------------------------| +| 15m Delayed Data | Per symbol | 1 credit | +| Historical Data | Per symbol | 1 credit | diff --git a/api/troubleshooting/multiple-ip-addresses.mdx b/api/troubleshooting/multiple-ip-addresses.mdx index 04d4612e..0b8cff8c 100644 --- a/api/troubleshooting/multiple-ip-addresses.mdx +++ b/api/troubleshooting/multiple-ip-addresses.mdx @@ -9,7 +9,7 @@ If your account is blocked, you do not need to contact support. The block will a During the block, you can continue making requests from the previously authorized IP address. ::: -If you encounter an issue where your account is temporarily blocked due to accessing the API from multiple devices, follow these steps to resolve it: +If you encounter an issue where your account is temporarily blocked due to accessing the API from multiple devices, follow these steps to resolve it. For background on why this restriction exists, see the [Single IP Address Policy](/docs/account/data-policies/single-ip/). ## Problem diff --git a/api/troubleshooting/real-time-data.mdx b/api/troubleshooting/real-time-data.mdx index 0dfcca48..1617a166 100644 --- a/api/troubleshooting/real-time-data.mdx +++ b/api/troubleshooting/real-time-data.mdx @@ -517,7 +517,7 @@ To help us resolve your issue quickly, please include: - **Dashboard**: [Market Data Dashboard](https://dashboard.marketdata.app/marketdata/) - **Entitlements Documentation**: [Exchange Entitlements](/account/entitlements) -- **Compliance Documentation**: [Account Compliance](/account/compliance) +- **Verification Documentation**: [Account Verification](/account/data-policies/account-verification) ## Summary diff --git a/api/troubleshooting/running-out-of-credits.mdx b/api/troubleshooting/running-out-of-credits.mdx index 27971f6c..14275a8c 100644 --- a/api/troubleshooting/running-out-of-credits.mdx +++ b/api/troubleshooting/running-out-of-credits.mdx @@ -47,11 +47,11 @@ Typical credit-limit error payload: Troubleshooting should follow your plan's optimization capabilities. -| Plan Group | Plans | Limit Window | `mode=cached` Available | -|---|---|---|---| -| Free + Trials | Free Forever, Starter Trial, Trader Trial | Daily | No | -| Starter + Trader | Starter, Trader | Daily | Yes | -| Quant + Prime | Quant, Prime | Per-minute | Yes | +| Plan Group | Plans | Limit Window | `mode=cached` Available | +|------------------|-------------------------------------------|--------------|-------------------------| +| Free + Trials | Free Forever, Starter Trial, Trader Trial | Daily | No | +| Starter + Trader | Starter, Trader | Daily | Yes | +| Quant + Prime | Quant, Prime | Per-minute | Yes | :::warning Trial plan limitation `mode=cached` is **not available** on Starter Trial and Trader Trial. diff --git a/api/universal-parameters/mode.md b/api/universal-parameters/mode.md index 92ba7f8b..878d9faa 100644 --- a/api/universal-parameters/mode.md +++ b/api/universal-parameters/mode.md @@ -127,13 +127,13 @@ This request returns market data that is delayed by a minimum of 15 minutes. ## Mode Comparison | Feature | Live Mode | Cached Mode | Delayed Mode | -| ------------------------------ | ------------------------------------ | -------------------------- | ------------------------------- | +|--------------------------------|--------------------------------------|----------------------------|---------------------------------| | **Data Timeliness** | Real-time | Seconds to minutes old | ≥ 15 minutes delayed | | **Pricing** | 1 credit per symbol with quote data | 1 credit per request | Same as live | | **Ideal Use-Case** | Time-sensitive decisions | Bulk quote retrieval | Non-time-sensitive applications | | **Default Behavior** | Paid accounts (if `mode` is omitted) | Must specify `mode=cached` | Free & trial accounts | -| **Paid Accounts Access** | ✅ | ✅ | ✅ | -| **Free/Trial Accounts Access** | ❌ | ❌ | ✅ | +| **Paid Accounts Access** | ✅ | ✅ | ✅ | +| **Free/Trial Accounts Access** | ❌ | ❌ | ✅ | * Choose **`mode=live`** when immediate data freshness is required. * Use **`mode=cached`** to reduce credit usage when working with large symbol sets. diff --git a/docusaurus.config.js b/docusaurus.config.js index 1ddaba91..481ae109 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -112,6 +112,10 @@ const config = { from: "/sheets/marketstatus", to: "/sheets/markets/marketstatus", }, + { + from: "/account/compliance", + to: "/account/data-policies/account-verification", + }, ], }, ], diff --git a/package.json b/package.json index b87fb2a9..a0d91e3f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "write-heading-ids": "docusaurus write-heading-ids", "typecheck": "tsc", "generate-docs": "node scripts/generate-master-docs.js", + "lint:tables": "node scripts/fix-table-alignment.js", + "fix:tables": "node scripts/fix-table-alignment.js --fix", "test:e2e": "playwright test" }, "dependencies": { diff --git a/scripts/fix-table-alignment.js b/scripts/fix-table-alignment.js new file mode 100644 index 00000000..bcfea933 --- /dev/null +++ b/scripts/fix-table-alignment.js @@ -0,0 +1,269 @@ +#!/usr/bin/env node +/** + * fix-table-alignment.js + * + * Checks and optionally fixes misaligned markdown tables in .md/.mdx files. + * "Aligned" means every cell in a column is padded to the same width so pipe + * characters form straight vertical lines in the source. + * + * Usage: + * node scripts/fix-table-alignment.js # check mode (exit 1 if misaligned) + * node scripts/fix-table-alignment.js --fix # fix mode (rewrites files in place) + * + * Add to CI: + * node scripts/fix-table-alignment.js + */ + +'use strict'; + +const fs = require('fs'); +const path = require('path'); + +const FIX_MODE = process.argv.includes('--fix'); +const ROOT = path.resolve(__dirname, '..'); + +// Directories to scan (relative to ROOT) +const SCAN_DIRS = ['docs', 'api', 'sheets', 'sdk', 'account']; +const EXTENSIONS = new Set(['.md', '.mdx']); + +// ─── Visual width ───────────────────────────────────────────────────────────── +// Most emoji and symbols render as 2 columns in monospace fonts. We need to +// account for this when computing padding so columns line up visually. + +function visualWidth(str) { + let w = 0; + for (const char of str) { + const cp = char.codePointAt(0); + if (isWide(cp)) { + w += 2; + } else { + w += 1; + } + } + return w; +} + +function isWide(cp) { + // Hangul Jamo + if (cp >= 0x1100 && cp <= 0x115F) return true; + // CJK Radicals Supplement … CJK Unified Ideographs Extension B (and beyond) + if (cp >= 0x2E80 && cp <= 0x9FFF) return true; + // Hangul Syllables + if (cp >= 0xAC00 && cp <= 0xD7AF) return true; + // CJK Compatibility Ideographs + if (cp >= 0xF900 && cp <= 0xFAFF) return true; + // Fullwidth Latin / Halfwidth Katakana / Fullwidth Signs + if (cp >= 0xFF00 && cp <= 0xFF60) return true; + if (cp >= 0xFFE0 && cp <= 0xFFE6) return true; + // Miscellaneous Symbols (✅ U+2705) and Dingbats (❌ U+274C) + if (cp >= 0x2600 && cp <= 0x27BF) return true; + // Enclosed Alphanumerics, Enclosed CJK, etc. + if (cp >= 0x2460 && cp <= 0x24FF) return true; + // Emoji (Miscellaneous Symbols and Pictographs, Transport, etc.) + if (cp >= 0x1F000) return true; + return false; +} + +/** Pad a string to a target visual width (appending spaces). */ +function padEndVisual(str, targetWidth) { + const spaces = Math.max(0, targetWidth - visualWidth(str)); + return str + ' '.repeat(spaces); +} + +// ─── Table parsing ──────────────────────────────────────────────────────────── + +/** Split a raw table line into trimmed cell strings. */ +function parseCells(line) { + let inner = line.trim(); + if (inner.startsWith('|')) inner = inner.slice(1); + if (inner.endsWith('|')) inner = inner.slice(0, -1); + return inner.split('|').map(c => c.trim()); +} + +/** Return true if all cells look like separator dashes (e.g. `---`, `:---:`, `---:`). */ +function isSeparatorRow(cells) { + return cells.length > 0 && cells.every(c => /^:?-+:?$/.test(c)); +} + +/** Detect the column alignment encoded in a separator cell. */ +function getAlignment(cell) { + const left = cell.startsWith(':'); + const right = cell.endsWith(':'); + if (left && right) return 'center'; + if (right) return 'right'; + return 'left'; +} + +/** + * Format a separator cell so it fills `colVisualWidth + 2` characters + * (matching the ` content ` format of data cells). + */ +function formatSeparator(alignment, colVisualWidth) { + const total = colVisualWidth + 2; // +2 for the surrounding spaces + switch (alignment) { + case 'center': return ':' + '-'.repeat(total - 2) + ':'; + case 'right': return '-'.repeat(total - 1) + ':'; + default: return '-'.repeat(total); + } +} + +/** + * Re-format a block of consecutive table lines so every column is uniformly + * padded to the widest cell in that column. + * Returns the formatted lines (same count as input). + */ +function formatTable(lines) { + const parsedRows = lines.map(parseCells); + const isSep = parsedRows.map(isSeparatorRow); + + // Grab alignments from the separator row (if present) + const sepIdx = isSep.findIndex(Boolean); + const alignments = sepIdx >= 0 ? parsedRows[sepIdx].map(getAlignment) : []; + + // Number of columns = max across all rows + const numCols = Math.max(...parsedRows.map(r => r.length)); + + // Compute maximum visual width for each column (ignoring separator rows) + const colWidths = Array(numCols).fill(1); // minimum 1 + for (let i = 0; i < parsedRows.length; i++) { + if (isSep[i]) continue; + for (let j = 0; j < parsedRows[i].length; j++) { + colWidths[j] = Math.max(colWidths[j], visualWidth(parsedRows[i][j])); + } + } + + // Rebuild each row + return lines.map((_, i) => { + const cells = parsedRows[i]; + const sep = isSep[i]; + const parts = []; + + for (let j = 0; j < numCols; j++) { + const cell = cells[j] !== undefined ? cells[j] : ''; + if (sep) { + parts.push(formatSeparator(alignments[j] || 'left', colWidths[j])); + } else { + parts.push(' ' + padEndVisual(cell, colWidths[j]) + ' '); + } + } + + return '|' + parts.join('|') + '|'; + }); +} + +// ─── File processing ────────────────────────────────────────────────────────── + +const TABLE_LINE = /^\s*\|/; +const FENCE_START = /^\s*(`{3,}|~{3,})/; + +/** + * Process one file: find tables, check/fix alignment. + * Returns { hasChanges, misalignedCount, newContent }. + */ +function processFile(filePath) { + const original = fs.readFileSync(filePath, 'utf8'); + const lines = original.split('\n'); + + let inFence = false; + let fenceChar = ''; + const result = []; + let misalignedCount = 0; + let i = 0; + + while (i < lines.length) { + const line = lines[i]; + + // Track fenced code blocks — don't touch their content + const fenceMatch = line.match(FENCE_START); + if (fenceMatch) { + if (!inFence) { + inFence = true; + fenceChar = fenceMatch[1][0]; + } else if (line.trim().startsWith(fenceChar)) { + inFence = false; + } + result.push(line); + i++; + continue; + } + + if (!inFence && TABLE_LINE.test(line)) { + // Collect the entire table block + const tableStart = i; + while (i < lines.length && TABLE_LINE.test(lines[i]) && !lines[i].match(FENCE_START)) { + i++; + } + const tableLines = lines.slice(tableStart, i); + const formatted = formatTable(tableLines); + + const changed = formatted.some((fl, j) => fl !== tableLines[j]); + if (changed) misalignedCount++; + + result.push(...formatted); + } else { + result.push(line); + i++; + } + } + + const newContent = result.join('\n'); + return { + hasChanges: newContent !== original, + misalignedCount, + newContent, + }; +} + +// ─── Directory traversal ────────────────────────────────────────────────────── + +function findFiles(dir) { + const results = []; + if (!fs.existsSync(dir)) return results; + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.name === 'node_modules' || entry.name.startsWith('.')) continue; + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + results.push(...findFiles(full)); + } else if (EXTENSIONS.has(path.extname(entry.name))) { + results.push(full); + } + } + return results; +} + +// ─── Main ───────────────────────────────────────────────────────────────────── + +let issues = 0; +let scanned = 0; +let fixed = 0; + +for (const dir of SCAN_DIRS) { + for (const file of findFiles(path.join(ROOT, dir))) { + scanned++; + const { hasChanges, misalignedCount, newContent } = processFile(file); + if (!hasChanges) continue; + + issues++; + const rel = path.relative(ROOT, file); + + if (FIX_MODE) { + fs.writeFileSync(file, newContent, 'utf8'); + fixed++; + console.log(` fixed ${rel} (${misalignedCount} table${misalignedCount > 1 ? 's' : ''})`); + } else { + console.log(` MISALIGNED ${rel} (${misalignedCount} table${misalignedCount > 1 ? 's' : ''})`); + } + } +} + +console.log(''); +if (FIX_MODE) { + console.log(`Scanned ${scanned} file(s). Fixed ${fixed} file(s).`); +} else if (issues === 0) { + console.log(`All tables aligned across ${scanned} file(s).`); + process.exit(0); +} else { + console.log(`Found misaligned tables in ${issues}/${scanned} file(s).`); + console.log('Run with --fix to auto-align.'); + process.exit(1); +} diff --git a/sdk/go/funds/candles.mdx b/sdk/go/funds/candles.mdx index 60543976..f40d9c5a 100644 --- a/sdk/go/funds/candles.mdx +++ b/sdk/go/funds/candles.mdx @@ -16,11 +16,11 @@ Retrieve historical price candles for any supported stock symbol. Use [FundCandlesRequest](<#FundCandlesRequest>) 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`, facilitating individual access to each candle. | -| **Packed** | Intermediate | `*FundCandlesResponse` | Returns a packed `*FundCandlesResponse` 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`, facilitating individual access to each candle. | +| **Packed** | Intermediate | `*FundCandlesResponse` | Returns a packed `*FundCandlesResponse` 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`. | diff --git a/sdk/go/markets/status.mdx b/sdk/go/markets/status.mdx index a0b1f904..3020f42e 100644 --- a/sdk/go/markets/status.mdx +++ b/sdk/go/markets/status.mdx @@ -16,11 +16,11 @@ Retrieve current, future, and historical open / closed status information. Utilize [MarketStatusRequest](<#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 `[]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`. | +| 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`. | diff --git a/sdk/go/options/chain.mdx b/sdk/go/options/chain.mdx index d010dafb..f08ffddc 100644 --- a/sdk/go/options/chain.mdx +++ b/sdk/go/options/chain.mdx @@ -16,11 +16,11 @@ Retrieve a a complete or filtered options chain for a given underlying symbol. B Utilize [OptionChainRequest](<#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 `[]OptionQuote`, allowing direct access to the options chain data. | -| **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*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 `[]OptionQuote`, allowing direct access to the options chain data. | +| **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*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`. | diff --git a/sdk/go/options/expirations.mdx b/sdk/go/options/expirations.mdx index e298d40c..312f2e26 100644 --- a/sdk/go/options/expirations.mdx +++ b/sdk/go/options/expirations.mdx @@ -13,11 +13,11 @@ Get a list of current or historical option expiration dates for an underlying sy Utilize [OptionsExpirationsRequest](<#OptionsExpirationsRequest>) for querying the endpoint through one of the three available methods: -| Method | Execution | Return Type | Description | -|------------|-----------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]time.Time` | Immediately fetches and returns a slice of `[]time.Time`, allowing direct access to each expiration date. | -| **Packed** | Intermediate | `*OptionsExpirationsResponse` | Delivers a `*OptionsExpirationsResponse` object containing the data, which requires unpacking to access the `[]time.Time` 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 | Return Type | Description | +|------------|--------------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------| +| **Get** | Direct | `[]time.Time` | Immediately fetches and returns a slice of `[]time.Time`, allowing direct access to each expiration date. | +| **Packed** | Intermediate | `*OptionsExpirationsResponse` | Delivers a `*OptionsExpirationsResponse` object containing the data, which requires unpacking to access the `[]time.Time` 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`. | diff --git a/sdk/go/options/lookup.mdx b/sdk/go/options/lookup.mdx index bbc63313..bb8c1068 100644 --- a/sdk/go/options/lookup.mdx +++ b/sdk/go/options/lookup.mdx @@ -16,11 +16,11 @@ Lookup the official option symbol based on a user's text input. Utilize \[OptionsLookupRequest\] for querying the endpoint through one of the three available methods: -| Method | Execution | Return Type | Description | -|------------|-----------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `string` | Immediately fetches and `string`, allowing direct access to the option symbol. | -| **Packed** | Intermediate | `*OptionLookupResponse` | Delivers a `*OptionLookupResponse` object containing the data, which requires unpacking to access the `string` 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 | Return Type | Description | +|------------|--------------|-------------------------|-------------------------------------------------------------------------------------------------------------------------| +| **Get** | Direct | `string` | Immediately fetches and `string`, allowing direct access to the option symbol. | +| **Packed** | Intermediate | `*OptionLookupResponse` | Delivers a `*OptionLookupResponse` object containing the data, which requires unpacking to access the `string` 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`. | diff --git a/sdk/go/options/quotes.mdx b/sdk/go/options/quotes.mdx index 399eeb12..9611494a 100644 --- a/sdk/go/options/quotes.mdx +++ b/sdk/go/options/quotes.mdx @@ -16,11 +16,11 @@ Retrieve an option quote for a given option symbol. Utilize [OptionQuoteRequest](<#OptionQuoteRequest>) for querying the endpoint through one of the three available methods: -| Method | Execution | Return Type | Description | -|------------|-----------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]OptionQuote` | Immediately fetches a slice of `[]OptionQuote`, allowing direct access to the quote data. | -| **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*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 | Return Type | Description | +|------------|--------------|-------------------------|---------------------------------------------------------------------------------------------------------------------------| +| **Get** | Direct | `[]OptionQuote` | Immediately fetches a slice of `[]OptionQuote`, allowing direct access to the quote data. | +| **Packed** | Intermediate | `*OptionQuotesResponse` | Delivers a `*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`. | diff --git a/sdk/go/options/strikes.mdx b/sdk/go/options/strikes.mdx index 71d0d91b..c162d2ce 100644 --- a/sdk/go/options/strikes.mdx +++ b/sdk/go/options/strikes.mdx @@ -16,11 +16,11 @@ Retrieve a complete or filtered list of option strike prices for a given underly Utilize [OptionStrikesRequest](<#OptionStrikesRequest>) for querying the endpoint through one of the three available methods: -| Method | Execution | Return Type | Description | -|------------|-----------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]OptionStrikes` | Immediately fetches a slice of `[]OptionStrikes`, allowing direct access to the options strikes data. | -| **Packed** | Intermediate | `*OptionStrikesResponse` | Delivers a `*OptionStrikesResponse` object containing the data, which requires unpacking to access the `[]OptionStrikes` 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 | Return Type | Description | +|------------|--------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| **Get** | Direct | `[]OptionStrikes` | Immediately fetches a slice of `[]OptionStrikes`, allowing direct access to the options strikes data. | +| **Packed** | Intermediate | `*OptionStrikesResponse` | Delivers a `*OptionStrikesResponse` object containing the data, which requires unpacking to access the `[]OptionStrikes` 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`. | diff --git a/sdk/go/stocks/bulkcandles.mdx b/sdk/go/stocks/bulkcandles.mdx index 901f6fd3..0dd1b107 100644 --- a/sdk/go/stocks/bulkcandles.mdx +++ b/sdk/go/stocks/bulkcandles.mdx @@ -16,11 +16,11 @@ Get bulk historical price data for many stock symbols at once or even obtain a f Utilize the [BulkStockCandlesRequest](<#BulkStockCandlesRequest>) for querying the endpoint through one of the three available methods: -| Method | Execution | 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 | 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`. | diff --git a/sdk/go/stocks/bulkquotes.mdx b/sdk/go/stocks/bulkquotes.mdx index 5f549ecf..37916243 100644 --- a/sdk/go/stocks/bulkquotes.mdx +++ b/sdk/go/stocks/bulkquotes.mdx @@ -16,11 +16,11 @@ Retrieve live quotes for multiple stocks symbols in a single request or even get Utilize [BulkStockQuotesRequest](<#BulkStockQuotesRequest>) to make requests to the endpoint through one of the three supported execution methods: -| Method | Execution | Return Type | Description | -|------------|---------------|-----------------------------|------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]StockQuote` | Directly returns a slice of `[]StockQuote`, facilitating individual access to each stock quote. | -| **Packed** | Intermediate | `*StockQuotesResponse` | Returns a packed `*StockQuotesResponse` object. Must be unpacked to access the `[]StockQuote` 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 | `[]StockQuote` | Directly returns a slice of `[]StockQuote`, facilitating individual access to each stock quote. | +| **Packed** | Intermediate | `*StockQuotesResponse` | Returns a packed `*StockQuotesResponse` object. Must be unpacked to access the `[]StockQuote` slice. | +| **Raw** | Low-level | `*resty.Response` | Offers the raw `*resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. | diff --git a/sdk/go/stocks/candles.mdx b/sdk/go/stocks/candles.mdx index e78581f1..0ccfc55e 100644 --- a/sdk/go/stocks/candles.mdx +++ b/sdk/go/stocks/candles.mdx @@ -16,11 +16,11 @@ Retrieve historical price candles for any supported stock symbol. Use [StockCandlesRequest](<#StockCandlesRequest>) 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`, facilitating individual access to each candle. | -| **Packed** | Intermediate | `*StockCandlesResponse` | Returns a packed `*StockCandlesResponse` 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`, facilitating individual access to each candle. | +| **Packed** | Intermediate | `*StockCandlesResponse` | Returns a packed `*StockCandlesResponse` 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`. | diff --git a/sdk/go/stocks/earnings.mdx b/sdk/go/stocks/earnings.mdx index 08c2dafc..5f72b5a7 100644 --- a/sdk/go/stocks/earnings.mdx +++ b/sdk/go/stocks/earnings.mdx @@ -16,11 +16,11 @@ Retrieve earnings data for any supported stock symbol. Use [StockEarningsRequest](<#StockEarningsRequest>) to make requests to the endpoint using any of the three supported execution methods: -| Method | Execution | Return Type | Description | -|------------|---------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]StockEarningsReport` | Directly returns a slice of `[]StockEarningsReport`, facilitating individual access to each earnings report. | -| **Packed** | Intermediate | `*StockEarningsResponse` | Returns a packed `*StockEarningsResponse` object. Must be unpacked to access the `[]StockEarningsReport` 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 | `[]StockEarningsReport` | Directly returns a slice of `[]StockEarningsReport`, facilitating individual access to each earnings report. | +| **Packed** | Intermediate | `*StockEarningsResponse` | Returns a packed `*StockEarningsResponse` object. Must be unpacked to access the `[]StockEarningsReport` slice. | +| **Raw** | Low-level | `*resty.Response` | Provides the raw `*resty.Response` for maximum flexibility. Direct access to raw JSON or `*http.Response`. | diff --git a/sdk/go/stocks/news.mdx b/sdk/go/stocks/news.mdx index 151b426e..c4626c05 100644 --- a/sdk/go/stocks/news.mdx +++ b/sdk/go/stocks/news.mdx @@ -16,11 +16,11 @@ Retrieve news articles for any supported stock symbol. Use [StockNewsRequest](<#StockNewsRequest>) to make requests to the endpoint using any of the three supported execution methods: -| Method | Execution | Return Type | Description | -|------------|---------------|-----------------------------|------------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]StockNews ` | Directly returns a slice of `[]StockNews`, facilitating individual access to each news article. | -| **Packed** | Intermediate | `*StockNewsResponse` | Returns a packed `*StockNewsResponse` object. Must be unpacked to access the `[]StockNews` 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 | `[]StockNews ` | Directly returns a slice of `[]StockNews`, facilitating individual access to each news article. | +| **Packed** | Intermediate | `*StockNewsResponse` | Returns a packed `*StockNewsResponse` object. Must be unpacked to access the `[]StockNews` slice. | +| **Raw** | Low-level | `*resty.Response` | Provides the raw `*resty.Response` for maximum flexibility. Direct access to raw JSON or `*http.Response`. | diff --git a/sdk/go/stocks/quotes.mdx b/sdk/go/stocks/quotes.mdx index ce6f69c4..c657e9d3 100644 --- a/sdk/go/stocks/quotes.mdx +++ b/sdk/go/stocks/quotes.mdx @@ -16,11 +16,11 @@ Retrieve live quotes for any supported stock symbol. Utilize [StockQuoteRequest](<#StockQuoteRequest>) to make requests to the endpoint through one of the three supported execution methods: -| Method | Execution | Return Type | Description | -|------------|---------------|----------------------------|-----------------------------------------------------------------------------------------------------------| -| **Get** | Direct | `[]StockQuote` | Directly returns a slice of `[]StockQuote`, facilitating individual access to each stock quote. | -| **Packed** | Intermediate | `StockQuotesResponse` | Returns a packed `StockQuotesResponse` object. Must be unpacked to access the `[]StockQuote` 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 | `[]StockQuote` | Directly returns a slice of `[]StockQuote`, facilitating individual access to each stock quote. | +| **Packed** | Intermediate | `StockQuotesResponse` | Returns a packed `StockQuotesResponse` object. Must be unpacked to access the `[]StockQuote` slice. | +| **Raw** | Low-level | `resty.Response` | Offers the raw `resty.Response` for utmost flexibility. Direct access to raw JSON or `*http.Response`. | diff --git a/sdk/php/client.mdx b/sdk/php/client.mdx index 28c59a33..a73a250f 100644 --- a/sdk/php/client.mdx +++ b/sdk/php/client.mdx @@ -41,13 +41,13 @@ $client = new Client('your_api_token_here', $logger); The Client exposes five endpoint resources as properties: -| Property | Type | Description | -|----------|------|-------------| -| `$client->stocks` | `Stocks` | Stock data including candles, quotes, earnings, and news | -| `$client->options` | `Options` | Options chains, expirations, strikes, and quotes | -| `$client->markets` | `Markets` | Market status and trading calendar | -| `$client->mutual_funds` | `MutualFunds` | Mutual fund candles | -| `$client->utilities` | `Utilities` | API status, headers, and rate limits | +| Property | Type | Description | +|-------------------------|---------------|----------------------------------------------------------| +| `$client->stocks` | `Stocks` | Stock data including candles, quotes, earnings, and news | +| `$client->options` | `Options` | Options chains, expirations, strikes, and quotes | +| `$client->markets` | `Markets` | Market status and trading calendar | +| `$client->mutual_funds` | `MutualFunds` | Mutual fund candles | +| `$client->utilities` | `Utilities` | API status, headers, and rate limits | ## Using Resources diff --git a/sdk/php/funds/candles.mdx b/sdk/php/funds/candles.mdx index 209187ce..1a4163f9 100644 --- a/sdk/php/funds/candles.mdx +++ b/sdk/php/funds/candles.mdx @@ -12,11 +12,11 @@ Get historical price candles (OHLCV data) for mutual funds. Use the `candles()` method on the `mutual_funds` resource to fetch fund candles: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Candles` | Returns a Candles object containing an array of Candle objects (default). | -| **CSV** | `Candles` | Returns a Candles object with CSV data accessible via `getCsv()`. | -| **HTML** | `Candles` | Returns a Candles object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|---------------------------------------------------------------------------| +| **JSON** | `Candles` | Returns a Candles object containing an array of Candle objects (default). | +| **CSV** | `Candles` | Returns a Candles object with CSV data accessible via `getCsv()`. | +| **HTML** | `Candles` | Returns a Candles object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/logging.mdx b/sdk/php/logging.mdx index 31959594..54f3bd58 100644 --- a/sdk/php/logging.mdx +++ b/sdk/php/logging.mdx @@ -30,16 +30,16 @@ $quote = $client->stocks->quote('AAPL'); The SDK supports standard PSR-3 log levels: -| Level | Description | -|-------|-------------| -| `emergency` | System is unusable | -| `alert` | Action must be taken immediately | -| `critical` | Critical conditions | -| `error` | Error conditions | -| `warning` | Warning conditions | -| `notice` | Normal but significant conditions | -| `info` | Informational messages | -| `debug` | Debug-level messages (most verbose) | +| Level | Description | +|-------------|-------------------------------------| +| `emergency` | System is unusable | +| `alert` | Action must be taken immediately | +| `critical` | Critical conditions | +| `error` | Error conditions | +| `warning` | Warning conditions | +| `notice` | Normal but significant conditions | +| `info` | Informational messages | +| `debug` | Debug-level messages (most verbose) | ## Custom Logger diff --git a/sdk/php/markets/status.mdx b/sdk/php/markets/status.mdx index f5e73e52..8c0358e1 100644 --- a/sdk/php/markets/status.mdx +++ b/sdk/php/markets/status.mdx @@ -12,11 +12,11 @@ Get the past, present, or future market status (open/closed) for any trading day Use the `status()` method on the `markets` resource to check market status: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Statuses` | Returns a Statuses object containing market status data (default). | -| **CSV** | `Statuses` | Returns a Statuses object with CSV data accessible via `getCsv()`. | -| **HTML** | `Statuses` | Returns a Statuses object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|----------------------------------------------------------------------| +| **JSON** | `Statuses` | Returns a Statuses object containing market status data (default). | +| **CSV** | `Statuses` | Returns a Statuses object with CSV data accessible via `getCsv()`. | +| **HTML** | `Statuses` | Returns a Statuses object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/options/chain.mdx b/sdk/php/options/chain.mdx index d91bb45f..1e0fa534 100644 --- a/sdk/php/options/chain.mdx +++ b/sdk/php/options/chain.mdx @@ -12,11 +12,11 @@ Get a current or historical end-of-day options chain for an underlying ticker sy Use the `option_chain()` method on the `options` resource to fetch option chains: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `OptionChains` | Returns an OptionChains object containing option contracts (default). | -| **CSV** | `OptionChains` | Returns an OptionChains object with CSV data accessible via `getCsv()`. | -| **HTML** | `OptionChains` | Returns an OptionChains object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|----------------|---------------------------------------------------------------------------| +| **JSON** | `OptionChains` | Returns an OptionChains object containing option contracts (default). | +| **CSV** | `OptionChains` | Returns an OptionChains object with CSV data accessible via `getCsv()`. | +| **HTML** | `OptionChains` | Returns an OptionChains object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/options/expirations.mdx b/sdk/php/options/expirations.mdx index 05a15a92..21b13908 100644 --- a/sdk/php/options/expirations.mdx +++ b/sdk/php/options/expirations.mdx @@ -12,11 +12,11 @@ Get a list of current or historical option expiration dates for an underlying sy Use the `expirations()` method on the `options` resource to fetch expiration dates: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Expirations` | Returns an Expirations object containing expiration dates (default). | -| **CSV** | `Expirations` | Returns an Expirations object with CSV data accessible via `getCsv()`. | -| **HTML** | `Expirations` | Returns an Expirations object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|---------------|--------------------------------------------------------------------------| +| **JSON** | `Expirations` | Returns an Expirations object containing expiration dates (default). | +| **CSV** | `Expirations` | Returns an Expirations object with CSV data accessible via `getCsv()`. | +| **HTML** | `Expirations` | Returns an Expirations object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/options/lookup.mdx b/sdk/php/options/lookup.mdx index a9034982..1d7e3bba 100644 --- a/sdk/php/options/lookup.mdx +++ b/sdk/php/options/lookup.mdx @@ -12,11 +12,11 @@ Convert a human-readable option description to the standard OCC option symbol fo Use the `lookup()` method on the `options` resource to convert option descriptions: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Lookup` | Returns a Lookup object containing the OCC symbol (default). | -| **CSV** | `Lookup` | Returns a Lookup object with CSV data accessible via `getCsv()`. | -| **HTML** | `Lookup` | Returns a Lookup object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|--------------------------------------------------------------------| +| **JSON** | `Lookup` | Returns a Lookup object containing the OCC symbol (default). | +| **CSV** | `Lookup` | Returns a Lookup object with CSV data accessible via `getCsv()`. | +| **HTML** | `Lookup` | Returns a Lookup object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/options/quotes.mdx b/sdk/php/options/quotes.mdx index 2c594a44..b8b807ae 100644 --- a/sdk/php/options/quotes.mdx +++ b/sdk/php/options/quotes.mdx @@ -12,11 +12,11 @@ Get current or historical end-of-day quotes for one or more options contracts. Use the `quotes()` method on the `options` resource to fetch option quotes: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Quotes` | Returns a Quotes object containing option quote data (default). | -| **CSV** | `Quotes` | Returns a Quotes object with CSV data accessible via `getCsv()`. | -| **HTML** | `Quotes` | Returns a Quotes object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|--------------------------------------------------------------------| +| **JSON** | `Quotes` | Returns a Quotes object containing option quote data (default). | +| **CSV** | `Quotes` | Returns a Quotes object with CSV data accessible via `getCsv()`. | +| **HTML** | `Quotes` | Returns a Quotes object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/options/strikes.mdx b/sdk/php/options/strikes.mdx index 0985bfb4..05b1e75c 100644 --- a/sdk/php/options/strikes.mdx +++ b/sdk/php/options/strikes.mdx @@ -12,11 +12,11 @@ Get a list of current or historical option strike prices for an underlying symbo Use the `strikes()` method on the `options` resource to fetch strike prices: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Strikes` | Returns a Strikes object containing strike prices (default). | -| **CSV** | `Strikes` | Returns a Strikes object with CSV data accessible via `getCsv()`. | -| **HTML** | `Strikes` | Returns a Strikes object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|---------------------------------------------------------------------| +| **JSON** | `Strikes` | Returns a Strikes object containing strike prices (default). | +| **CSV** | `Strikes` | Returns a Strikes object with CSV data accessible via `getCsv()`. | +| **HTML** | `Strikes` | Returns a Strikes object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/parameters.mdx b/sdk/php/parameters.mdx index 88357aea..4b1b9836 100644 --- a/sdk/php/parameters.mdx +++ b/sdk/php/parameters.mdx @@ -487,14 +487,14 @@ $candles = $client->stocks->candles( You can set the following environment variables to configure universal parameters globally: -| Variable | Values | Description | -|----------|--------|-------------| -| `MARKETDATA_FORMAT` | `json`, `csv`, `html` | Output format | -| `MARKETDATA_DATE_FORMAT` | `timestamp`, `unix`, `spreadsheet` | Date format for CSV/HTML | -| `MARKETDATA_COLUMNS` | Comma-separated list | Columns to include | -| `MARKETDATA_ADD_HEADERS` | `true`, `false` | Include headers in CSV/HTML | -| `MARKETDATA_USE_HUMAN_READABLE` | `true`, `false` | Human-readable format | -| `MARKETDATA_MODE` | `live`, `cached`, `delayed` | Data mode | +| Variable | Values | Description | +|---------------------------------|------------------------------------|-----------------------------| +| `MARKETDATA_FORMAT` | `json`, `csv`, `html` | Output format | +| `MARKETDATA_DATE_FORMAT` | `timestamp`, `unix`, `spreadsheet` | Date format for CSV/HTML | +| `MARKETDATA_COLUMNS` | Comma-separated list | Columns to include | +| `MARKETDATA_ADD_HEADERS` | `true`, `false` | Include headers in CSV/HTML | +| `MARKETDATA_USE_HUMAN_READABLE` | `true`, `false` | Human-readable format | +| `MARKETDATA_MODE` | `live`, `cached`, `delayed` | Data mode | ## Best Practices diff --git a/sdk/php/stocks/bulk-candles.mdx b/sdk/php/stocks/bulk-candles.mdx index 43c9e5a8..3d4c75a3 100644 --- a/sdk/php/stocks/bulk-candles.mdx +++ b/sdk/php/stocks/bulk-candles.mdx @@ -12,11 +12,11 @@ Retrieve bulk daily candle data for multiple stocks in a single request. This en Use the `bulkCandles()` method on the `stocks` resource to fetch bulk candle data: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `BulkCandles` | Returns a BulkCandles object containing an array of Candle objects (default). | -| **CSV** | `BulkCandles` | Returns a BulkCandles object with CSV data accessible via `getCsv()`. | -| **HTML** | `BulkCandles` | Returns a BulkCandles object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|---------------|-------------------------------------------------------------------------------| +| **JSON** | `BulkCandles` | Returns a BulkCandles object containing an array of Candle objects (default). | +| **CSV** | `BulkCandles` | Returns a BulkCandles object with CSV data accessible via `getCsv()`. | +| **HTML** | `BulkCandles` | Returns a BulkCandles object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/candles.mdx b/sdk/php/stocks/candles.mdx index b42ec006..ab4b0fd7 100644 --- a/sdk/php/stocks/candles.mdx +++ b/sdk/php/stocks/candles.mdx @@ -12,11 +12,11 @@ Retrieve historical price candles (OHLCV data) for any supported stock symbol. Use the `candles()` method on the `stocks` resource to fetch stock candles. The method supports multiple output formats and automatically handles large date ranges by splitting them into year-long chunks and fetching them concurrently: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Candles` | Returns a Candles object containing an array of Candle objects (default). | -| **CSV** | `Candles` | Returns a Candles object with CSV data accessible via `getCsv()`. | -| **HTML** | `Candles` | Returns a Candles object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|---------------------------------------------------------------------------| +| **JSON** | `Candles` | Returns a Candles object containing an array of Candle objects (default). | +| **CSV** | `Candles` | Returns a Candles object with CSV data accessible via `getCsv()`. | +| **HTML** | `Candles` | Returns a Candles object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/earnings.mdx b/sdk/php/stocks/earnings.mdx index 7071b7d4..32f9028b 100644 --- a/sdk/php/stocks/earnings.mdx +++ b/sdk/php/stocks/earnings.mdx @@ -16,11 +16,11 @@ The earnings endpoint requires a premium subscription. Free and trial accounts c Use the `earnings()` method on the `stocks` resource to fetch earnings data: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Earnings` | Returns an Earnings object containing earnings report data (default). | -| **CSV** | `Earnings` | Returns an Earnings object with CSV data accessible via `getCsv()`. | -| **HTML** | `Earnings` | Returns an Earnings object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|-----------------------------------------------------------------------| +| **JSON** | `Earnings` | Returns an Earnings object containing earnings report data (default). | +| **CSV** | `Earnings` | Returns an Earnings object with CSV data accessible via `getCsv()`. | +| **HTML** | `Earnings` | Returns an Earnings object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/news.mdx b/sdk/php/stocks/news.mdx index 8aa2da1c..38f21729 100644 --- a/sdk/php/stocks/news.mdx +++ b/sdk/php/stocks/news.mdx @@ -16,11 +16,11 @@ The news endpoint is currently in beta. Features and response formats may change Use the `news()` method on the `stocks` resource to fetch news articles: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `News` | Returns a News object containing news articles (default). | -| **CSV** | `News` | Returns a News object with CSV data accessible via `getCsv()`. | -| **HTML** | `News` | Returns a News object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|------------------------------------------------------------------| +| **JSON** | `News` | Returns a News object containing news articles (default). | +| **CSV** | `News` | Returns a News object with CSV data accessible via `getCsv()`. | +| **HTML** | `News` | Returns a News object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/prices.mdx b/sdk/php/stocks/prices.mdx index c92aa6e6..869e2ebd 100644 --- a/sdk/php/stocks/prices.mdx +++ b/sdk/php/stocks/prices.mdx @@ -12,11 +12,11 @@ Get real-time midpoint prices for one or more stocks using the SmartMid model. Use the `prices()` method on the `stocks` resource to fetch midpoint prices: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Prices` | Returns a Prices object containing price data (default). | -| **CSV** | `Prices` | Returns a Prices object with CSV data accessible via `getCsv()`. | -| **HTML** | `Prices` | Returns a Prices object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|--------------------------------------------------------------------| +| **JSON** | `Prices` | Returns a Prices object containing price data (default). | +| **CSV** | `Prices` | Returns a Prices object with CSV data accessible via `getCsv()`. | +| **HTML** | `Prices` | Returns a Prices object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/quote.mdx b/sdk/php/stocks/quote.mdx index 87cbc2b4..84f34e84 100644 --- a/sdk/php/stocks/quote.mdx +++ b/sdk/php/stocks/quote.mdx @@ -12,11 +12,11 @@ Get a real-time price quote for a single stock symbol. Use the `quote()` method on the `stocks` resource to fetch a real-time quote: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Quote` | Returns a Quote object with typed properties (default). | -| **CSV** | `Quote` | Returns a Quote object with CSV data accessible via `getCsv()`. | -| **HTML** | `Quote` | Returns a Quote object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|-------------------------------------------------------------------| +| **JSON** | `Quote` | Returns a Quote object with typed properties (default). | +| **CSV** | `Quote` | Returns a Quote object with CSV data accessible via `getCsv()`. | +| **HTML** | `Quote` | Returns a Quote object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/php/stocks/quotes.mdx b/sdk/php/stocks/quotes.mdx index 50ecd309..08b0ece3 100644 --- a/sdk/php/stocks/quotes.mdx +++ b/sdk/php/stocks/quotes.mdx @@ -12,11 +12,11 @@ Get real-time price quotes for multiple stocks in a single API request. Use the `quotes()` method on the `stocks` resource to fetch quotes for multiple symbols: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **JSON** | `Quotes` | Returns a Quotes object containing an array of Quote data (default). | -| **CSV** | `Quotes` | Returns a Quotes object with CSV data accessible via `getCsv()`. | -| **HTML** | `Quotes` | Returns a Quotes object with HTML data accessible via `getHtml()`. | +| Output Format | Return Type | Description | +|---------------|-------------|----------------------------------------------------------------------| +| **JSON** | `Quotes` | Returns a Quotes object containing an array of Quote data (default). | +| **CSV** | `Quotes` | Returns a Quotes object with CSV data accessible via `getCsv()`. | +| **HTML** | `Quotes` | Returns a Quotes object with HTML data accessible via `getHtml()`. | :::warning HTML Not Yet Available `Format::HTML` is included for forward compatibility, but HTML responses are not currently implemented by the Market Data API. diff --git a/sdk/py/funds/candles.mdx b/sdk/py/funds/candles.mdx index 756624a4..22f283a2 100644 --- a/sdk/py/funds/candles.mdx +++ b/sdk/py/funds/candles.mdx @@ -12,12 +12,12 @@ Retrieve historical price candles for any supported fund symbol. Use the `candles()` method on the `funds` resource to fetch fund candles. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data (default). | -| **INTERNAL** | `list[FundsCandle]` or `list[FundsCandlesHumanReadable]` | Returns a list of FundsCandle objects. When `use_human_readable=True`, returns a list of FundsCandlesHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data (default). | +| **INTERNAL** | `list[FundsCandle]` or `list[FundsCandlesHumanReadable]` | Returns a list of FundsCandle objects. When `use_human_readable=True`, returns a list of FundsCandlesHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## candles diff --git a/sdk/py/markets/status.mdx b/sdk/py/markets/status.mdx index 1fb98945..6c7d6d89 100644 --- a/sdk/py/markets/status.mdx +++ b/sdk/py/markets/status.mdx @@ -12,12 +12,12 @@ Retrieve market status information (open/closed) for dates and countries. Use the `status()` method on the `markets` resource to fetch market status information. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with market status data (default). | -| **INTERNAL** | `list[MarketStatus]` or `list[MarketStatusHumanReadable]` | Returns a list of MarketStatus objects. When `use_human_readable=True`, returns a list of MarketStatusHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with market status data (default). | +| **INTERNAL** | `list[MarketStatus]` or `list[MarketStatusHumanReadable]` | Returns a list of MarketStatus objects. When `use_human_readable=True`, returns a list of MarketStatusHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## status diff --git a/sdk/py/options/chain.mdx b/sdk/py/options/chain.mdx index 3122e4e2..c672ffd9 100644 --- a/sdk/py/options/chain.mdx +++ b/sdk/py/options/chain.mdx @@ -12,12 +12,12 @@ Retrieve a complete or filtered options chain for a given underlying symbol. Bot Use the `chain()` method on the `options` resource to fetch options chain data. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with options chain data indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsChain` or `OptionsChainHumanReadable` | Returns an OptionsChain object containing lists of option data. When `use_human_readable=True`, returns an OptionsChainHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with options chain data indexed by optionSymbol (default). | +| **INTERNAL** | `OptionsChain` or `OptionsChainHumanReadable` | Returns an OptionsChain object containing lists of option data. When `use_human_readable=True`, returns an OptionsChainHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## chain diff --git a/sdk/py/options/expirations.mdx b/sdk/py/options/expirations.mdx index 68d8e92c..a8c01fdc 100644 --- a/sdk/py/options/expirations.mdx +++ b/sdk/py/options/expirations.mdx @@ -12,12 +12,12 @@ Get a list of current or historical option expiration dates for an underlying sy Use the `expirations()` method on the `options` resource to fetch expiration dates. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with expiration dates indexed by expirations (default). | -| **INTERNAL** | `OptionsExpirations` or `OptionsExpirationsHumanReadable` | Returns an OptionsExpirations object. When `use_human_readable=True`, returns an OptionsExpirationsHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with expiration dates indexed by expirations (default). | +| **INTERNAL** | `OptionsExpirations` or `OptionsExpirationsHumanReadable` | Returns an OptionsExpirations object. When `use_human_readable=True`, returns an OptionsExpirationsHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## expirations diff --git a/sdk/py/options/lookup.mdx b/sdk/py/options/lookup.mdx index f0294475..c6f57482 100644 --- a/sdk/py/options/lookup.mdx +++ b/sdk/py/options/lookup.mdx @@ -12,12 +12,12 @@ Lookup an option symbol from a human-readable string format. Use the `lookup()` method on the `options` resource to lookup option symbols. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option lookup data indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsLookup` or `OptionsLookupHumanReadable` | Returns an OptionsLookup object. When `use_human_readable=True`, returns an OptionsLookupHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option lookup data indexed by optionSymbol (default). | +| **INTERNAL** | `OptionsLookup` or `OptionsLookupHumanReadable` | Returns an OptionsLookup object. When `use_human_readable=True`, returns an OptionsLookupHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## lookup diff --git a/sdk/py/options/quotes.mdx b/sdk/py/options/quotes.mdx index 5bbbb340..ab6b97f5 100644 --- a/sdk/py/options/quotes.mdx +++ b/sdk/py/options/quotes.mdx @@ -12,12 +12,12 @@ Retrieve quotes for one or more option symbols. Use the `quotes()` method on the `options` resource to fetch option quotes. The method supports multiple output formats and automatically handles multiple symbols by fetching them concurrently: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option quotes indexed by optionSymbol (default). | -| **INTERNAL** | `OptionsQuotes` or `OptionsQuotesHumanReadable` | Returns an OptionsQuotes object containing lists of option quote data. When `use_human_readable=True`, returns an OptionsQuotesHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with option quotes indexed by optionSymbol (default). | +| **INTERNAL** | `OptionsQuotes` or `OptionsQuotesHumanReadable` | Returns an OptionsQuotes object containing lists of option quote data. When `use_human_readable=True`, returns an OptionsQuotesHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## quotes diff --git a/sdk/py/options/strikes.mdx b/sdk/py/options/strikes.mdx index cd56f0ab..a59eb556 100644 --- a/sdk/py/options/strikes.mdx +++ b/sdk/py/options/strikes.mdx @@ -12,12 +12,12 @@ Get a list of available strike prices for an underlying symbol. Use the `strikes()` method on the `options` resource to fetch strike prices. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with strike prices (default). | -| **INTERNAL** | `OptionsStrikes` or `OptionsStrikesHumanReadable` | Returns an OptionsStrikes object. When `use_human_readable=True`, returns an OptionsStrikesHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with strike prices (default). | +| **INTERNAL** | `OptionsStrikes` or `OptionsStrikesHumanReadable` | Returns an OptionsStrikes object. When `use_human_readable=True`, returns an OptionsStrikesHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## strikes diff --git a/sdk/py/stocks/candles.mdx b/sdk/py/stocks/candles.mdx index 9f795fea..7e648927 100644 --- a/sdk/py/stocks/candles.mdx +++ b/sdk/py/stocks/candles.mdx @@ -12,12 +12,12 @@ Retrieve historical price candles for any supported stock symbol. Use the `candles()` method on the `stocks` resource to fetch stock candles. The method supports multiple output formats and automatically handles large date ranges by splitting them into year-long chunks and fetching them concurrently: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data indexed by timestamp (default). | -| **INTERNAL** | `list[StockCandle]` or `list[StockCandlesHumanReadable]` | Returns a list of StockCandle objects. When `use_human_readable=True`, returns a list of StockCandlesHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|----------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with candles data indexed by timestamp (default). | +| **INTERNAL** | `list[StockCandle]` or `list[StockCandlesHumanReadable]` | Returns a list of StockCandle objects. When `use_human_readable=True`, returns a list of StockCandlesHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## candles diff --git a/sdk/py/stocks/earnings.mdx b/sdk/py/stocks/earnings.mdx index 9adf863d..dff112eb 100644 --- a/sdk/py/stocks/earnings.mdx +++ b/sdk/py/stocks/earnings.mdx @@ -12,12 +12,12 @@ Retrieve earnings data for any supported stock symbol. Use the `earnings()` method on the `stocks` resource to fetch earnings data. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with earnings data indexed by symbol (default). | -| **INTERNAL** | `StockEarnings` or `StockEarningsHumanReadable` | Returns a StockEarnings object. When `use_human_readable=True`, returns a StockEarningsHumanReadable object with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with earnings data indexed by symbol (default). | +| **INTERNAL** | `StockEarnings` or `StockEarningsHumanReadable` | Returns a StockEarnings object. When `use_human_readable=True`, returns a StockEarningsHumanReadable object with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## earnings diff --git a/sdk/py/stocks/news.mdx b/sdk/py/stocks/news.mdx index d5b19dcd..dd98ce35 100644 --- a/sdk/py/stocks/news.mdx +++ b/sdk/py/stocks/news.mdx @@ -12,12 +12,12 @@ Retrieve news articles for any supported stock symbol. Use the `news()` method on the `stocks` resource to fetch news articles. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with news articles indexed by symbol (default). | -| **INTERNAL** | `list[StockNews]` or `list[StockNewsHumanReadable]` | Returns a list of StockNews objects. When `use_human_readable=True`, returns a list of StockNewsHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with news articles indexed by symbol (default). | +| **INTERNAL** | `list[StockNews]` or `list[StockNewsHumanReadable]` | Returns a list of StockNews objects. When `use_human_readable=True`, returns a list of StockNewsHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## news diff --git a/sdk/py/stocks/prices.mdx b/sdk/py/stocks/prices.mdx index 596d3aaa..ad3b602b 100644 --- a/sdk/py/stocks/prices.mdx +++ b/sdk/py/stocks/prices.mdx @@ -12,12 +12,12 @@ Retrieve stock prices for any supported stock symbol. Use the `prices()` method on the `stocks` resource to fetch stock prices. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with prices indexed by symbol (default). | -| **INTERNAL** | `list[StockPrice]` or `list[StockPricesHumanReadable]` | Returns a list of StockPrice objects. When `use_human_readable=True`, returns a list of StockPricesHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|--------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with prices indexed by symbol (default). | +| **INTERNAL** | `list[StockPrice]` or `list[StockPricesHumanReadable]` | Returns a list of StockPrice objects. When `use_human_readable=True`, returns a list of StockPricesHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## prices diff --git a/sdk/py/stocks/quotes.mdx b/sdk/py/stocks/quotes.mdx index 86a9b968..dcccc0df 100644 --- a/sdk/py/stocks/quotes.mdx +++ b/sdk/py/stocks/quotes.mdx @@ -12,12 +12,12 @@ Retrieve live quotes for any supported stock symbol. Use the `quotes()` method on the `stocks` resource to fetch stock quotes. The method supports multiple output formats: -| Output Format | Return Type | Description | -|---------------|-------------|-------------| -| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with quotes indexed by symbol (default). | -| **INTERNAL** | `list[StockQuote]` or `list[StockQuotesHumanReadable]` | Returns a list of StockQuote objects. When `use_human_readable=True`, returns a list of StockQuotesHumanReadable objects with capitalized field names. | -| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | -| **CSV** | `str` | Writes CSV data to file and returns the filename string. | +| Output Format | Return Type | Description | +|---------------|--------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| +| **DATAFRAME** | `pandas.DataFrame` or `polars.DataFrame` | Returns a DataFrame with quotes indexed by symbol (default). | +| **INTERNAL** | `list[StockQuote]` or `list[StockQuotesHumanReadable]` | Returns a list of StockQuote objects. When `use_human_readable=True`, returns a list of StockQuotesHumanReadable objects with capitalized field names. | +| **JSON** | `dict` | Returns the raw JSON response as a dictionary. | +| **CSV** | `str` | Writes CSV data to file and returns the filename string. | ## quotes diff --git a/sdk/sdk-requirements.md b/sdk/sdk-requirements.md index 876b5d90..d1ac0521 100644 --- a/sdk/sdk-requirements.md +++ b/sdk/sdk-requirements.md @@ -24,28 +24,28 @@ This means: ### Required Style Guides -| Language | Style Guide / Best Practices | -|----------|------------------------------| -| Python | [PEP 8](https://peps.python.org/pep-0008/), [PEP 257](https://peps.python.org/pep-0257/) (docstrings) | -| PHP | [PSR-12](https://www.php-fig.org/psr/psr-12/), [PSR-4](https://www.php-fig.org/psr/psr-4/) (autoloading) | +| Language | Style Guide / Best Practices | +|------------|-----------------------------------------------------------------------------------------------------------------------------------| +| Python | [PEP 8](https://peps.python.org/pep-0008/), [PEP 257](https://peps.python.org/pep-0257/) (docstrings) | +| PHP | [PSR-12](https://www.php-fig.org/psr/psr-12/), [PSR-4](https://www.php-fig.org/psr/psr-4/) (autoloading) | | JavaScript | [MDN Guidelines](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Writing_style_guide/Code_style_guide/JavaScript) | -| TypeScript | [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/) | -| Go | [Effective Go](https://go.dev/doc/effective_go), [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments) | -| Java | [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) | -| C# | [.NET Framework Design Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/) | -| Rust | [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/) | +| TypeScript | [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/) | +| Go | [Effective Go](https://go.dev/doc/effective_go), [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments) | +| Java | [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html) | +| C# | [.NET Framework Design Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/) | +| Rust | [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/) | SDKs must pass the standard linter for their language (e.g., `ruff` for Python, `phpcs` for PHP, `golint` for Go). -| Language | Error Handling | Async Pattern | Default Output | Naming | -|----------|---------------|---------------|----------------|--------| -| Python | Exceptions* | Sync (async optional) | pandas DataFrame | snake_case | -| JavaScript | Promise rejection | async/await | Plain objects | camelCase | -| PHP | Exceptions | Sync | Objects/arrays | camelCase | -| Go | Return `error` | Blocking + context | Structs | PascalCase exported | -| Java | Exceptions | CompletableFuture | POJOs | camelCase | -| C# | Exceptions | Task async/await | Objects | PascalCase | -| Rust | Return `Result` | async with runtime | Structs | snake_case | +| Language | Error Handling | Async Pattern | Default Output | Naming | +|------------|-----------------------|-----------------------|------------------|---------------------| +| Python | Exceptions* | Sync (async optional) | pandas DataFrame | snake_case | +| JavaScript | Promise rejection | async/await | Plain objects | camelCase | +| PHP | Exceptions | Sync | Objects/arrays | camelCase | +| Go | Return `error` | Blocking + context | Structs | PascalCase exported | +| Java | Exceptions | CompletableFuture | POJOs | camelCase | +| C# | Exceptions | Task async/await | Objects | PascalCase | +| Rust | Return `Result` | async with runtime | Structs | snake_case | > **\* Python SDK Technical Debt:** The current Python SDK (v1.x) returns `MarketDataClientErrorResult` instead of raising exceptions. This is non-idiomatic and will be fixed in v2.0. **New SDKs must use idiomatic patterns from day one.** @@ -53,20 +53,20 @@ SDKs must pass the standard linter for their language (e.g., `ruff` for Python, ## Quick Reference -| Requirement | Priority | -|-------------|----------| -| Bearer token authentication | Must | -| Environment-based configuration | Must | -| Connection pooling | Must | -| Fixed 99-second timeout | Must | -| Typed input validation | Must | -| Typed output models | Must | -| Structured error handling | Must | -| API credit tracking | Must | -| Retry with exponential backoff | Must | -| API status awareness | Should | -| Multiple output formats | Should | -| Batch/concurrency helpers | Should | +| Requirement | Priority | +|-----------------------------------|----------| +| Bearer token authentication | Must | +| Environment-based configuration | Must | +| Connection pooling | Must | +| Fixed 99-second timeout | Must | +| Typed input validation | Must | +| Typed output models | Must | +| Structured error handling | Must | +| API credit tracking | Must | +| Retry with exponential backoff | Must | +| API status awareness | Should | +| Multiple output formats | Should | +| Batch/concurrency helpers | Should | | Ecosystem-native advanced formats | Optional | --- @@ -122,13 +122,13 @@ Do not duplicate REST paths, payload schemas, or parameter contracts in this doc SDKs must provide first-class methods for the following capabilities (language-idiomatic naming is expected): -| Resource | Required SDK Methods (capabilities) | -|----------|-------------------------------------| -| `stocks` | `prices`, `quotes`, `candles`, `earnings`, `news` | -| `options` | `chain`, `expirations`, `strikes`, `quotes`, `lookup` | -| `funds` | `candles` | -| `markets` | `status` | -| `utilities` | `status`, `headers`, `user` | +| Resource | Required SDK Methods (capabilities) | +|-------------|-------------------------------------------------------| +| `stocks` | `prices`, `quotes`, `candles`, `earnings`, `news` | +| `options` | `chain`, `expirations`, `strikes`, `quotes`, `lookup` | +| `funds` | `candles` | +| `markets` | `status` | +| `utilities` | `status`, `headers`, `user` | --- @@ -136,12 +136,12 @@ SDKs must provide first-class methods for the following capabilities (language-i All endpoint methods must support these parameters: -| Parameter | Values | Description | -|-----------|--------|-------------| -| `dateformat` | `timestamp`, `unix`, `spreadsheet` | Controls date output format | -| `columns` | array of strings | Filter response to specific columns | -| `headers` | boolean | Include headers in CSV output | -| `human` | boolean | Use human-readable field names | +| Parameter | Values | Description | +|--------------|------------------------------------|-------------------------------------| +| `dateformat` | `timestamp`, `unix`, `spreadsheet` | Controls date output format | +| `columns` | array of strings | Filter response to specific columns | +| `headers` | boolean | Include headers in CSV output | +| `human` | boolean | Use human-readable field names | --- @@ -151,12 +151,12 @@ All SDKs must implement a three-tier configuration system where more specific se ### Priority Order (Lowest → Highest) -| Priority | Source | Scope | Example | -|----------|--------|-------|---------| -| 1 (lowest) | `.env` file | Project-level | `.env` file in project root | -| 2 | Environment variables | System/shell | `export MARKETDATA_TOKEN=...` | -| 3 | Client defaults | Per-client instance | `client.default_params.output_format = "json"` | -| 4 (highest) | Method parameters | Per-request | `client.stocks.prices("AAPL", output_format="csv")` | +| Priority | Source | Scope | Example | +|-------------|-----------------------|---------------------|-----------------------------------------------------| +| 1 (lowest) | `.env` file | Project-level | `.env` file in project root | +| 2 | Environment variables | System/shell | `export MARKETDATA_TOKEN=...` | +| 3 | Client defaults | Per-client instance | `client.default_params.output_format = "json"` | +| 4 (highest) | Method parameters | Per-request | `client.stocks.prices("AAPL", output_format="csv")` | SDKs should automatically load `.env` files from the current working directory if present. @@ -181,18 +181,18 @@ Result: output_format="csv" (method parameter wins) ### Supported Environment Variables -| Variable | Purpose | Default | -|----------|---------|---------| -| `MARKETDATA_TOKEN` | API authentication token | (none) | -| `MARKETDATA_BASE_URL` | API base URL | `https://api.marketdata.app` | -| `MARKETDATA_API_VERSION` | API version | `v1` | -| `MARKETDATA_LOGGING_LEVEL` | SDK logging level | `INFO` | -| `MARKETDATA_OUTPUT_FORMAT` | Default output format | (language default) | -| `MARKETDATA_DATE_FORMAT` | Default date format | `timestamp` | -| `MARKETDATA_COLUMNS` | Columns to include | (all) | -| `MARKETDATA_ADD_HEADERS` | Include headers in CSV | `true` | -| `MARKETDATA_USE_HUMAN_READABLE` | Human-readable field names | `false` | -| `MARKETDATA_MODE` | Data mode (live/cached/delayed) | `live` | +| Variable | Purpose | Default | +|---------------------------------|---------------------------------|------------------------------| +| `MARKETDATA_TOKEN` | API authentication token | (none) | +| `MARKETDATA_BASE_URL` | API base URL | `https://api.marketdata.app` | +| `MARKETDATA_API_VERSION` | API version | `v1` | +| `MARKETDATA_LOGGING_LEVEL` | SDK logging level | `INFO` | +| `MARKETDATA_OUTPUT_FORMAT` | Default output format | (language default) | +| `MARKETDATA_DATE_FORMAT` | Default date format | `timestamp` | +| `MARKETDATA_COLUMNS` | Columns to include | (all) | +| `MARKETDATA_ADD_HEADERS` | Include headers in CSV | `true` | +| `MARKETDATA_USE_HUMAN_READABLE` | Human-readable field names | `false` | +| `MARKETDATA_MODE` | Data mode (live/cached/delayed) | `live` | --- @@ -225,28 +225,28 @@ When no token is provided: All SDKs must define these error types: -| Error Type | When to Use | -|------------|-------------| +| Error Type | When to Use | +|-----------------------|--------------------------------------| | `AuthenticationError` | 401 responses, invalid/missing token | -| `BadRequestError` | 400 responses, invalid parameters | -| `NotFoundError` | 404 responses | -| `RateLimitError` | 429 responses, rate limit exceeded | -| `ServerError` | 5xx responses | -| `NetworkError` | Connection failures, timeouts | -| `ParseError` | Failed to parse response | +| `BadRequestError` | 400 responses, invalid parameters | +| `NotFoundError` | 404 responses | +| `RateLimitError` | 429 responses, rate limit exceeded | +| `ServerError` | 5xx responses | +| `NetworkError` | Connection failures, timeouts | +| `ParseError` | Failed to parse response | ### 6.2 Support Context Every error must include these fields for support staff troubleshooting: -| Field | Source | Example | -|-------|--------|---------| -| `request_id` | `cf-ray` response header | `"8a1b2c3d4e5f6g7h-SJC"` | -| `request_url` | Full request URL | `"https://api.marketdata.app/v1/stocks/quotes/"` | -| `status_code` | HTTP status code | `429` | -| `timestamp` | SDK-generated (US/Eastern) | `"2025-02-21 12:00:00"` | -| `message` | Error description | `"Rate limit exceeded"` | -| `exception_type` | Error class name | `"RateLimitError"` | +| Field | Source | Example | +|------------------|----------------------------|--------------------------------------------------| +| `request_id` | `cf-ray` response header | `"8a1b2c3d4e5f6g7h-SJC"` | +| `request_url` | Full request URL | `"https://api.marketdata.app/v1/stocks/quotes/"` | +| `status_code` | HTTP status code | `429` | +| `timestamp` | SDK-generated (US/Eastern) | `"2025-02-21 12:00:00"` | +| `message` | Error description | `"Rate limit exceeded"` | +| `exception_type` | Error class name | `"RateLimitError"` | In exception-based SDKs (Python, PHP, Java, C#, JavaScript/TypeScript), these support-context fields must be properties on the thrown exception object. In returned-error SDKs (Go, Rust), these fields must be present on the returned error value/type. @@ -271,15 +271,15 @@ This must be accessible via `error.support_info` or equivalent. Follow the idiomatic error handling pattern for each language: -| Language | Pattern | Example | -|----------|---------|---------| -| Python | Raise exceptions | `raise RateLimitError(...)` | -| JavaScript | Reject promises | `throw new RateLimitError(...)` | -| PHP | Throw exceptions | `throw new RateLimitException(...)` | -| Go | Return error | `return nil, &RateLimitError{...}` | -| Java | Throw exceptions | `throw new RateLimitException(...)` | -| C# | Throw exceptions | `throw new RateLimitException(...)` | -| Rust | Return Result | `Err(MarketDataError::RateLimit {...})` | +| Language | Pattern | Example | +|------------|------------------|-----------------------------------------| +| Python | Raise exceptions | `raise RateLimitError(...)` | +| JavaScript | Reject promises | `throw new RateLimitError(...)` | +| PHP | Throw exceptions | `throw new RateLimitException(...)` | +| Go | Return error | `return nil, &RateLimitError{...}` | +| Java | Throw exceptions | `throw new RateLimitException(...)` | +| C# | Throw exceptions | `throw new RateLimitException(...)` | +| Rust | Return Result | `Err(MarketDataError::RateLimit {...})` | **Do not** force exception-based error handling onto Go or Rust. **Do not** force Result types onto Python or PHP. @@ -301,12 +301,12 @@ Example: `2025-02-21 12:00:00 - marketdata.client - INFO - Making request to /v1 Configurable via `MARKETDATA_LOGGING_LEVEL` environment variable: -| Level | What to Log | -|-------|-------------| -| DEBUG | Token (redacted), request details, response headers | -| INFO | Client initialization, base URL, API version | -| WARNING | Demo mode, deprecated features | -| ERROR | Request failures, rate limit errors | +| Level | What to Log | +|---------|-----------------------------------------------------| +| DEBUG | Token (redacted), request details, response headers | +| INFO | Client initialization, base URL, API version | +| WARNING | Demo mode, deprecated features | +| ERROR | Request failures, rate limit errors | ### Required Log Points @@ -371,16 +371,16 @@ client.rate_limits ### 9.1 HTTP Status Code Handling -| Status Code | Action | -|-------------|--------| -| 200 | Success - parse response | -| 203 | Success - non-authoritative (cached data) - parse response | -| 400 | Throw `BadRequestError` - do not retry | -| 401 | Throw `AuthenticationError` - **fail immediately**, do not retry | -| 404 | Return empty/no-data response (not an error for most endpoints) | -| 429 | Throw `RateLimitError` - do not retry, expose retry-after | -| 500 | Throw `ServerError` - do not retry | -| 501-599 | Retry with exponential backoff | +| Status Code | Action | +|-------------|------------------------------------------------------------------| +| 200 | Success - parse response | +| 203 | Success - non-authoritative (cached data) - parse response | +| 400 | Throw `BadRequestError` - do not retry | +| 401 | Throw `AuthenticationError` - **fail immediately**, do not retry | +| 404 | Return empty/no-data response (not an error for most endpoints) | +| 429 | Throw `RateLimitError` - do not retry, expose retry-after | +| 500 | Throw `ServerError` - do not retry | +| 501-599 | Retry with exponential backoff | **Note on 404**: Most endpoints return 404 when no data exists (e.g., no quotes for a delisted symbol). SDKs should return an empty result object with `no_data = true` rather than throwing an exception. @@ -452,28 +452,28 @@ The API wire format uses compressed, array-keyed JSON. SDKs must decode this int Each SDK should return data in the format most natural for that language ecosystem: -| Language | Default Output | Notes | -|----------|---------------|-------| -| Python | pandas DataFrame | DataFrames are the standard for financial data in Python | -| R | data.frame / tibble | DataFrames are standard in R workflows | -| JavaScript | Plain objects/arrays | Native JS objects, easily JSON-serializable | -| PHP | Objects or associative arrays | Follow PHP conventions | -| Go | Typed structs | Strongly typed, no reflection magic | -| Java | POJOs | Standard Java bean patterns | -| C# | Typed objects | .NET conventions | -| Rust | Typed structs | With serde for serialization | +| Language | Default Output | Notes | +|------------|-------------------------------|----------------------------------------------------------| +| Python | pandas DataFrame | DataFrames are the standard for financial data in Python | +| R | data.frame / tibble | DataFrames are standard in R workflows | +| JavaScript | Plain objects/arrays | Native JS objects, easily JSON-serializable | +| PHP | Objects or associative arrays | Follow PHP conventions | +| Go | Typed structs | Strongly typed, no reflection magic | +| Java | POJOs | Standard Java bean patterns | +| C# | Typed objects | .NET conventions | +| Rust | Typed structs | With serde for serialization | ### 11.3 Additional Format Support SDKs may support additional formats only when they are idiomatic for that language: -| Language / Ecosystem | Additional Formats to Support | -|----------------------|-------------------------------| -| Python | Optional Polars DataFrame output | -| R | Optional tibble/data.table output | +| Language / Ecosystem | Additional Formats to Support | +|-----------------------|------------------------------------------------------| +| Python | Optional Polars DataFrame output | +| R | Optional tibble/data.table output | | JavaScript/TypeScript | Plain JSON objects/arrays (no DataFrame requirement) | -| PHP | Objects/arrays and optional CSV export | -| Go/Java/C#/Rust | Typed models; no DataFrame requirement | +| PHP | Objects/arrays and optional CSV export | +| Go/Java/C#/Rust | Typed models; no DataFrame requirement | Do not add ecosystem-misaligned formats just for parity across SDKs. @@ -489,10 +489,10 @@ All response objects must provide: #### Format Detection Methods -| Method | Returns | -|--------|---------| +| Method | Returns | +|------------|-----------------------------------| | `isJson()` | `true` if response is JSON format | -| `isCsv()` | `true` if response is CSV format | +| `isCsv()` | `true` if response is CSV format | | `isHtml()` | `true` if response is HTML format | #### File Saving @@ -650,14 +650,14 @@ Integration tests make **actual REST requests** to the live API: ### Package Registry -| Language | Registry | -|----------|----------| -| Python | PyPI | -| JavaScript | npm | -| Java | Maven Central | -| Go | Go modules (pkg.go.dev) | -| C# | NuGet | -| Rust | crates.io | +| Language | Registry | +|------------|-------------------------| +| Python | PyPI | +| JavaScript | npm | +| Java | Maven Central | +| Go | Go modules (pkg.go.dev) | +| C# | NuGet | +| Rust | crates.io | ### License diff --git a/sheets/options/optionchain.md b/sheets/options/optionchain.md index a1cc18ca..4ddea559 100644 --- a/sheets/options/optionchain.md +++ b/sheets/options/optionchain.md @@ -82,13 +82,13 @@ Fetches a current option chain from Market Data. The `OPTIONCHAIN` function fetches current option chain data. The type of data you receive depends on your user type and OPRA entitlement. This may include real-time data, 15-minute delayed data, or historical data, depending on the plan or access level. To get real-time options data, users need to sign the OPRA agreement. -| User Type | OPRA Entitlement | Data Type | -|-----------|------------------|-----------| -| Non-Professional | ✅ | Real-time | -| Non-Professional | ❌ | 15-min delayed | -| Professional | ✅ | 15-min delayed | -| Professional | ❌ | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | OPRA Entitlement | Data Type | +|------------------|------------------|------------------------| +| Non-Professional | ✅ | Real-time | +| Non-Professional | ❌ | 15-min delayed | +| Professional | ✅ | 15-min delayed | +| Professional | ❌ | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | :::info What are entitlements? Entitlements are permissions granted by exchanges that allow access to their data. To get real-time options data, users need to sign the [OPRA agreement](/account/entitlements). [Learn more about entitlements](/account/entitlements). diff --git a/sheets/options/optiondata.md b/sheets/options/optiondata.md index fa5260c9..7cbc77ec 100644 --- a/sheets/options/optiondata.md +++ b/sheets/options/optiondata.md @@ -57,23 +57,23 @@ Entitlements are permissions granted by exchanges that allow access to their dat When you use `OPTIONDATA` without date parameters, it returns current option quote data. **The data type you receive depends on your user type and OPRA entitlement.** This may include real-time data, 15-minute delayed data, or historical data (1 day old), depending on your entitlements and user classification. -| User Type | OPRA Entitlement | Data Type | -|-----------|------------------|-----------| -| Non-Professional | ✅ | Real-time | -| Non-Professional | ❌ | 15-min delayed | -| Professional | Any | Historical (1 day old) | -| Unknown | Any | Historical (1 day old) | +| User Type | OPRA Entitlement | Data Type | +|------------------|------------------|------------------------| +| Non-Professional | ✅ | Real-time | +| Non-Professional | ❌ | 15-min delayed | +| Professional | Any | Historical (1 day old) | +| Unknown | Any | Historical (1 day old) | #### Historical Quotes (With Date Parameters) When you use `OPTIONDATA` with date parameters, it returns historical option quote data. **Historical data is available to all users regardless of exchange entitlements.** However, the age of historical data you can access depends on your plan: -| Plan | Historical Data Availability | -|------|------------------------------| -| Free Forever | 1 year | -| Trial Plans (Starter, Trader) | 1 year | -| Starter | 5 years | -| Trader, Quant, Prime | No limit (full access) | +| Plan | Historical Data Availability | +|-------------------------------|------------------------------| +| Free Forever | 1 year | +| Trial Plans (Starter, Trader) | 1 year | +| Starter | 5 years | +| Trader, Quant, Prime | No limit (full access) | :::info Plan Limits If you attempt to access historical data older than your plan's limit permits, the formula will return an error. [Learn more about plan limits](/account/plan-limits). diff --git a/sheets/stocks/stockdata.md b/sheets/stocks/stockdata.md index 5228f3fe..69b8b5b5 100644 --- a/sheets/stocks/stockdata.md +++ b/sheets/stocks/stockdata.md @@ -81,13 +81,13 @@ Fetches a current stock quote or historical stock candles from Market Data. It c When you are looking for a single price for a stock, depending on what data you would like the `STOCKDATA` formula to return during the extended session (or when the market is closed), it may make sense to use the "close", "last", or "mid" attributes instead of STOCKDATA's default "price" attribute. -| Function Call | During The Regular Session | During The Extended Session | Market Closed, Holidays, etc. | -|-----------------------------------|------------------------------------------|------------------------------------------|-----------------------------------------------| -| `=STOCKDATA("AAPL")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | Closing price of the previous regular session | -| `=STOCKDATA("AAPL", "PRICE")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | Closing price of the previous regular session | -| `=STOCKDATA("AAPL", "CLOSE")` | Last trade of the regular session | Closing price of the previous session | Closing price of the previous regular session | -| `=STOCKDATA("AAPL", "LAST")` | Last trade of the regular session | Last trade of the extended session | Last trade of the previous extended session | -| `=STOCKDATA("AAPL", "MID")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | No data | +| Function Call | During The Regular Session | During The Extended Session | Market Closed, Holidays, etc. | +|-------------------------------|-----------------------------------------|------------------------------------------|-----------------------------------------------| +| `=STOCKDATA("AAPL")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | Closing price of the previous regular session | +| `=STOCKDATA("AAPL", "PRICE")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | Closing price of the previous regular session | +| `=STOCKDATA("AAPL", "CLOSE")` | Last trade of the regular session | Closing price of the previous session | Closing price of the previous regular session | +| `=STOCKDATA("AAPL", "LAST")` | Last trade of the regular session | Last trade of the extended session | Last trade of the previous extended session | +| `=STOCKDATA("AAPL", "MID")` | Midpoint bid/ask of the regular session | Midpoint bid/ask of the extended session | No data | ## Usage Information @@ -103,36 +103,36 @@ Entitlements are permissions granted by exchanges that allow access to their dat When you use `STOCKDATA` without date parameters, it returns quote data. The type of quote you receive depends on your user type and IEX entitlement. This may include a real-time quote, a 15-minute delayed quote or historical (1 day old) quote, depending on the plan or access level. Real-time quotes are not currently available. -| User Type | IEX Entitlement | Quote Type | -|-----------|----------------|------------| -| Non-Professional | ✅ | Real-time | -| Non-Professional | ❌ | 15-min delayed | -| Professional | ✅ | Real-time | -| Professional | ❌ | Historical (1 day old) | -| Unknown | ✅ | Real-time | -| Unknown | ❌ | Historical (1 day old) | +| User Type | IEX Entitlement | Quote Type | +|------------------|-----------------|------------------------| +| Non-Professional | ✅ | Real-time | +| Non-Professional | ❌ | 15-min delayed | +| Professional | ✅ | Real-time | +| Professional | ❌ | Historical (1 day old) | +| Unknown | ✅ | Real-time | +| Unknown | ❌ | Historical (1 day old) | #### Current Day Candles When you use `STOCKDATA` with date parameters to request candles from the current trading session (today), you receive current day candle data. **Real-time candle data is not available for candles under any plan or entitlement.** The type of candle data you receive depends on your user type and UTP entitlement. This may include 15-minute delayed candles or historical candles (1 day old), depending on the plan or access level. -| User Type | UTP Entitlement | Candle Type | -|-----------|----------------|-------------| -| Non-Professional | ✅ | 15-min delayed | -| Non-Professional | ❌ | 15-min delayed | -| Professional | ✅ | 15-min delayed | -| Unknown | Any | Historical (1 day old) | +| User Type | UTP Entitlement | Candle Type | +|------------------|-----------------|------------------------| +| Non-Professional | ✅ | 15-min delayed | +| Non-Professional | ❌ | 15-min delayed | +| Professional | ✅ | 15-min delayed | +| Unknown | Any | Historical (1 day old) | #### Historical Candles When you use `STOCKDATA` with date parameters to request candles from past dates, you receive historical candle data. Historical candles can use any resolution (intraday, daily, weekly, etc.) from past trading sessions. **Historical data is available to all users regardless of exchange entitlements.** However, the age of historical data you can access depends on your plan: -| Plan | Historical Data Availability | -|------|------------------------------| -| Free Forever | 1 year | -| Trial Plans (Starter, Trader) | 1 year | -| Starter | 5 years | -| Trader, Quant, Prime | No limit (full access) | +| Plan | Historical Data Availability | +|-------------------------------|------------------------------| +| Free Forever | 1 year | +| Trial Plans (Starter, Trader) | 1 year | +| Starter | 5 years | +| Trader, Quant, Prime | No limit (full access) | :::info Plan Limits If you attempt to access historical data older than your plan's limit permits, the formula will return an error. [Learn more about plan limits](/account/plan-limits). diff --git a/sheets/troubleshooting/urlfetch.md b/sheets/troubleshooting/urlfetch.md index 6aefac06..ea50345d 100644 --- a/sheets/troubleshooting/urlfetch.md +++ b/sheets/troubleshooting/urlfetch.md @@ -11,14 +11,14 @@ Each time Market Data recalculates the data in a cell, that will consume one cal Urlfetch calls are different from Market Data requests. Even if you have our Trader plan and can make 100,000 requests per day, if you use a consumer (gmail.com) account, you'll only be able to make 20,000 urlfetch calls with your spreadsheet. Your urlfetch limit is set by Google and cannot be modified by Market Data. ::: -| Feature | Consumer Accounts (Gmail) | Google Workspace Accounts | -|--------------------------|---------------------------|---------------------------| -| **Daily Urlfetch Limit** | 20,000 urlfetch calls | 100,000 urlfetch calls | -| **Typical Use Case** | Personal use, small projects | Business use, large projects | -| **Recalculation Impact** | Higher risk of hitting limit with frequent recalculations | Lower risk due to higher limit | -| **Market Data Requests** | Limited by lower urlfetch quota | More flexibility with higher quota | -| **Account Blocking** | 24-hour block after exceeding limit | 24-hour block after exceeding limit | -| **Strategies Needed** | More aggressive strategies to reduce usage | Fewer strategies needed due to higher limit | +| Feature | Consumer Accounts (Gmail) | Google Workspace Accounts | +|--------------------------|-----------------------------------------------------------|---------------------------------------------| +| **Daily Urlfetch Limit** | 20,000 urlfetch calls | 100,000 urlfetch calls | +| **Typical Use Case** | Personal use, small projects | Business use, large projects | +| **Recalculation Impact** | Higher risk of hitting limit with frequent recalculations | Lower risk due to higher limit | +| **Market Data Requests** | Limited by lower urlfetch quota | More flexibility with higher quota | +| **Account Blocking** | 24-hour block after exceeding limit | 24-hour block after exceeding limit | +| **Strategies Needed** | More aggressive strategies to reduce usage | Fewer strategies needed due to higher limit | ## Error Messages You May See In The Add-on Due to Urlfetch Issues diff --git a/static/exchange-agreements/iex-controlled-data-recipient-agreement.pdf b/static/exchange-agreements/iex-controlled-data-recipient-agreement.pdf new file mode 100644 index 00000000..5bd8ef59 Binary files /dev/null and b/static/exchange-agreements/iex-controlled-data-recipient-agreement.pdf differ diff --git a/static/exchange-agreements/opra-subscriber-agreement.pdf b/static/exchange-agreements/opra-subscriber-agreement.pdf new file mode 100644 index 00000000..ed614777 Binary files /dev/null and b/static/exchange-agreements/opra-subscriber-agreement.pdf differ diff --git a/static/exchange-agreements/utp-subscriber-agreement.pdf b/static/exchange-agreements/utp-subscriber-agreement.pdf new file mode 100644 index 00000000..2a11618c Binary files /dev/null and b/static/exchange-agreements/utp-subscriber-agreement.pdf differ