List on Ocean Marketplace

The sample queries take a polygon, date range, and provider id and return the average temperature, and the raw data points, respectively. The query endpoints are public so no access token is required to run:

# sample analytics query:
# query one month's 3 hourly data for a polygon and provider, return average temperature.
export HOST=https://<host>.com/api
curl -s \
     -w '\n' \
     -G \
     -H "Content-Type: application/json" \
     -d 'polygon={"type":"Polygon","coordinates":[[[-3.7025,40.4165],[3,60],[6,90],[-3.7025,40.4165]]]}' \
     -d 'startdate=2019-01-01' \
     -d 'enddate=2019-01-02' \
     -d 'providerId=tSuqRPkLVfDqQG3mgr0x4' \
     $HOST/596090/00833a
# raw data on which above query is based:
curl -s \
     -w '\n' \
     -G \
     -H "Content-Type: application/json" \
     -d 'polygon={"type":"Polygon","coordinates":[[[-3.7025,40.4165],[3,60],[6,90],[-3.7025,40.4165]]]}' \
     -d 'startdate=2019-01-01' \
     -d 'enddate=2019-01-02' \
     -d 'providerId=tSuqRPkLVfDqQG3mgr0x4' \
     $HOST/596090/7afb79

The data query is more appropriate for the Ocean marketplace than the previous average temperature query, which is more an example of a composable intermediate endpoint for an inference toolchain.

Data from the second query was listed on the Ocean Görli test network:

Note that you need Görli ETH and Görli OCEAN tokens to purchase. Faucet for Görli OCEAN

Relevant code:

Last updated