Skip to content

Add Sharpe API definition#2508

Open
rishabhng wants to merge 2 commits into
APIs-guru:mainfrom
rishabhng:add-sharpe-api-definition
Open

Add Sharpe API definition#2508
rishabhng wants to merge 2 commits into
APIs-guru:mainfrom
rishabhng:add-sharpe-api-definition

Conversation

@rishabhng

Copy link
Copy Markdown

Adds Sharpe's official OpenAPI definition to the directory.

The API fits this repository as a machine-readable OpenAPI 3.0 definition for crypto market intelligence, including derivatives, market data, arbitrage, narratives, exchange listings, and signals. I added the APIs.guru metadata fields and repaired two response references in the submitted copy so the definition validates while keeping the official origin URL.

Spec origin: https://www.sharpe.ai/openapi.json
Website/docs: https://www.sharpe.ai/docs/free-api
Validation: npx --yes @apidevtools/swagger-cli validate APIs/sharpe.ai/1.0.0/openapi.yaml and git diff --check pass.
Linear: SHA-65

Disclosure: I work on Sharpe.

Adds the official Sharpe OpenAPI definition to the directory.

Listing URL: https://www.sharpe.ai/openapi.json

Website URL: https://www.sharpe.ai/docs/free-api

Linear: SHA-65

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the initial OpenAPI 3.0.0 specification for the Sharpe API, providing a comprehensive set of endpoints for crypto market data, including derivatives, arbitrage opportunities, and market signals. Feedback on the specification highlighted an inconsistency where endpoints supporting a CSV format via the FormatParam parameter lacked a corresponding text/csv content type in their successful response definitions.

Comment on lines +69 to +72
content:
application/json:
schema:
"$ref": "#/components/schemas/SuccessEnvelope"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The FormatParam parameter allows for a csv response format, but the 200 response definition only includes application/json. Please add text/csv to the content section for this and other endpoints that use FormatParam to accurately reflect the API's capabilities.

content:
  application/json:
    schema:
      "$ref": "#/components/schemas/SuccessEnvelope"
  text/csv:
    schema:
      type: string

@rishabhng

Copy link
Copy Markdown
Author

Thanks for catching this. I updated the OpenAPI definition so every endpoint that accepts format=csv now documents text/csv alongside the existing application/json 200 response.

The JSON response schemas are unchanged; this only makes the documented response content types match the API behavior. Please let me know if you prefer a shared CSV response component instead of repeating text/csv per endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant