# Apiosk Gateway – Marketstack Execute

> Apiosk Gateway – Marketstack Execute is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.11/call, status unknown (last checked 2026-09-15).

Executes a Marketstack stock market data API operation via the Apiosk x402 pay-per-call gateway, forwarding the request and returning the upstream response.

## Facts

- Endpoint: POST https://gateway.apiosk.com/marketstack/execute
- Price: $0.11/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apiosk-gateway-marketstack-execute-076c1a7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UYxCYbnEvM1oiWVUmWF3p

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apiosk-gateway-marketstack-execute-076c1a7e -d '<json body>'
```

Example prompt: Can you get me the end-of-day price history for AAPL from January 1 to March 31 this year using the Marketstack eod operation?

## When to prefer this

Choose this endpoint when you need programmatic, pay-per-call access to Marketstack stock market data (historical prices, OHLCV, tickers, exchanges) without managing a Marketstack API subscription. Prefer it over direct Marketstack access when operating in an x402/USDC micropayment environment or when avoiding per-month subscription costs. Not suitable for real-time streaming or non-equity financial data.

## Known failure modes

- Invalid operation selector returns an error status with no result
- Malformed JSON input payload causes upstream rejection
- Insufficient USDC balance or failed x402 payment prevents execution
- Marketstack upstream rate limit or API error propagates as non-200 upstream_status
- Unknown api_slug or operation path returns a gateway-level error

## How this service works

Pay-per-call API gateway on the x402 protocol (HTTP 402 + USDC on Base). This document covers the gateway's discovery and execution meta-endpoints. Individual provider APIs are reachable at /{api_slug}/{path} and described by GET /{api_slug}/metadata.

## Output

Returns a JSON object with a status field, the upstream Marketstack API response body in 'result', the operation invoked, the cost in USDC, and the latency in milliseconds. The 'result' field contains the raw Marketstack response (e.g. OHLCV arrays, ticker lists, exchange data).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "JSON payload forwarded to the selected operation."
  },
  "operation": {
   "type": "string",
   "description": "Operation id, /path, or METHOD /path selector."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "result"
 ],
 "properties": {
  "api": {
   "type": "string"
  },
  "cost": {
   "type": "string"
  },
  "result": {
   "description": "Upstream response body."
  },
  "status": {
   "type": "string"
  },
  "latency": {
   "type": "number"
  },
  "operation": {
   "type": "string"
  },
  "upstream_status": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apiosk-gateway-marketstack-execute-076c1a7e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
