olab-open-api 0.2.1
Prediction Market OpenAPI
Requires Python: >=3.9
Keywords: OpenAPI, OpenAPI-Generator, Prediction Market OpenAPI

# olab-open-api
Prediction Market REST API for trading and market operations

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0
- Package version: 0.2.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://polymarket.com/support](https://polymarket.com/support)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import olab_open_api
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import olab_open_api
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import olab_open_api
from olab_open_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8080/openapi
# See configuration.py for a list of all supported configuration parameters.
configuration = olab_open_api.Configuration(
    host = "http://localhost:8080/openapi"
)



# Enter a context with an instance of the API client
with olab_open_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = olab_open_api.OpenAPIApi(api_client)
    apikey = 'apikey_example' # str | apikey
    market_id = 56 # int | Market ID

    try:
        # Get Detail of a Categorical Market
        api_response = api_instance.openapi_market_categorical_market_id_get(apikey, market_id)
        print("The response of OpenAPIApi->openapi_market_categorical_market_id_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling OpenAPIApi->openapi_market_categorical_market_id_get: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost:8080/openapi*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*OpenAPIApi* | [**openapi_market_categorical_market_id_get**](docs/OpenAPIApi.md#openapi_market_categorical_market_id_get) | **GET** /openapi/market/categorical/{marketId} | Get Detail of a Categorical Market
*OpenAPIApi* | [**openapi_market_get**](docs/OpenAPIApi.md#openapi_market_get) | **GET** /openapi/market | Get Market List
*OpenAPIApi* | [**openapi_market_market_id_get**](docs/OpenAPIApi.md#openapi_market_market_id_get) | **GET** /openapi/market/{marketId} | Get Detail of a Binary Market
*OpenAPIApi* | [**openapi_order_cancel_post**](docs/OpenAPIApi.md#openapi_order_cancel_post) | **POST** /openapi/order/cancel | Cancel an order
*OpenAPIApi* | [**openapi_order_get**](docs/OpenAPIApi.md#openapi_order_get) | **GET** /openapi/order | Get orders
*OpenAPIApi* | [**openapi_order_order_id_get**](docs/OpenAPIApi.md#openapi_order_order_id_get) | **GET** /openapi/order/{orderId} | Get order detail
*OpenAPIApi* | [**openapi_order_post**](docs/OpenAPIApi.md#openapi_order_post) | **POST** /openapi/order | Create an order
*OpenAPIApi* | [**openapi_positions_get**](docs/OpenAPIApi.md#openapi_positions_get) | **GET** /openapi/positions | Get user positions
*OpenAPIApi* | [**openapi_quote_token_get**](docs/OpenAPIApi.md#openapi_quote_token_get) | **GET** /openapi/quoteToken | Get quote token list
*OpenAPIApi* | [**openapi_token_fee_rates_get**](docs/OpenAPIApi.md#openapi_token_fee_rates_get) | **GET** /openapi/token/fee-rates | Get fee rates for a token
*OpenAPIApi* | [**openapi_token_latest_price_get**](docs/OpenAPIApi.md#openapi_token_latest_price_get) | **GET** /openapi/token/latest-price | Get latest price of a token
*OpenAPIApi* | [**openapi_token_orderbook_get**](docs/OpenAPIApi.md#openapi_token_orderbook_get) | **GET** /openapi/token/orderbook | Get orderbook of a token
*OpenAPIApi* | [**openapi_token_price_history_get**](docs/OpenAPIApi.md#openapi_token_price_history_get) | **GET** /openapi/token/price-history | Get price history of a token
*OpenAPIApi* | [**openapi_trade_get**](docs/OpenAPIApi.md#openapi_trade_get) | **GET** /openapi/trade | Get user&#39;s trades
*OpenAPIApi* | [**openapi_user_balance_get**](docs/OpenAPIApi.md#openapi_user_balance_get) | **GET** /openapi/user/balance | Get user&#39;s quote token balances
*UserApi* | [**openapi_user_auth_get**](docs/UserApi.md#openapi_user_auth_get) | **GET** /openapi/user/auth | Auth


## Documentation For Models

 - [ModelsTopicStatus](docs/ModelsTopicStatus.md)
 - [OpenapiBalanceRespOpenAPI](docs/OpenapiBalanceRespOpenAPI.md)
 - [OpenapiCancelOrderRequestOpenAPI](docs/OpenapiCancelOrderRequestOpenAPI.md)
 - [OpenapiCancelOrderRespOpenAPI](docs/OpenapiCancelOrderRespOpenAPI.md)
 - [OpenapiChildMarketDataOpenAPI](docs/OpenapiChildMarketDataOpenAPI.md)
 - [OpenapiFeeRatesRespOpenAPI](docs/OpenapiFeeRatesRespOpenAPI.md)
 - [OpenapiLatestPriceRespOpenAPI](docs/OpenapiLatestPriceRespOpenAPI.md)
 - [OpenapiMarketCategoricalMarketIdGet200Response](docs/OpenapiMarketCategoricalMarketIdGet200Response.md)
 - [OpenapiMarketDataOpenAPI](docs/OpenapiMarketDataOpenAPI.md)
 - [OpenapiMarketDetailRespOpenAPI](docs/OpenapiMarketDetailRespOpenAPI.md)
 - [OpenapiMarketGet200Response](docs/OpenapiMarketGet200Response.md)
 - [OpenapiMarketListRespOpenAPI](docs/OpenapiMarketListRespOpenAPI.md)
 - [OpenapiOrderCancelPost200Response](docs/OpenapiOrderCancelPost200Response.md)
 - [OpenapiOrderDataOpenAPI](docs/OpenapiOrderDataOpenAPI.md)
 - [OpenapiOrderDetailRespOpenAPI](docs/OpenapiOrderDetailRespOpenAPI.md)
 - [OpenapiOrderGet200Response](docs/OpenapiOrderGet200Response.md)
 - [OpenapiOrderListRespOpenAPI](docs/OpenapiOrderListRespOpenAPI.md)
 - [OpenapiOrderOrderIdGet200Response](docs/OpenapiOrderOrderIdGet200Response.md)
 - [OpenapiOrderPost200Response](docs/OpenapiOrderPost200Response.md)
 - [OpenapiOrderbookLevel](docs/OpenapiOrderbookLevel.md)
 - [OpenapiOrderbookRespOpenAPI](docs/OpenapiOrderbookRespOpenAPI.md)
 - [OpenapiPositionDataOpenAPI](docs/OpenapiPositionDataOpenAPI.md)
 - [OpenapiPositionsGet200Response](docs/OpenapiPositionsGet200Response.md)
 - [OpenapiPositionsRespOpenAPI](docs/OpenapiPositionsRespOpenAPI.md)
 - [OpenapiPriceHistoryRespOpenAPI](docs/OpenapiPriceHistoryRespOpenAPI.md)
 - [OpenapiPricePoint](docs/OpenapiPricePoint.md)
 - [OpenapiQuoteTokenBalance](docs/OpenapiQuoteTokenBalance.md)
 - [OpenapiQuoteTokenDataOpenAPI](docs/OpenapiQuoteTokenDataOpenAPI.md)
 - [OpenapiQuoteTokenGet200Response](docs/OpenapiQuoteTokenGet200Response.md)
 - [OpenapiQuoteTokenListRespOpenAPI](docs/OpenapiQuoteTokenListRespOpenAPI.md)
 - [OpenapiTokenFeeRatesGet200Response](docs/OpenapiTokenFeeRatesGet200Response.md)
 - [OpenapiTokenLatestPriceGet200Response](docs/OpenapiTokenLatestPriceGet200Response.md)
 - [OpenapiTokenOrderbookGet200Response](docs/OpenapiTokenOrderbookGet200Response.md)
 - [OpenapiTokenPriceHistoryGet200Response](docs/OpenapiTokenPriceHistoryGet200Response.md)
 - [OpenapiTradeDataOpenAPI](docs/OpenapiTradeDataOpenAPI.md)
 - [OpenapiTradeGet200Response](docs/OpenapiTradeGet200Response.md)
 - [OpenapiTradeListRespOpenAPI](docs/OpenapiTradeListRespOpenAPI.md)
 - [OpenapiUserAuthGet200Response](docs/OpenapiUserAuthGet200Response.md)
 - [OpenapiUserBalanceGet200Response](docs/OpenapiUserBalanceGet200Response.md)
 - [V2AddOrderReq](docs/V2AddOrderReq.md)
 - [V2AddOrderResp](docs/V2AddOrderResp.md)
 - [V2GetApiKeyResp](docs/V2GetApiKeyResp.md)
 - [V2OrderData](docs/V2OrderData.md)
 - [ViewAPIBaseResponse](docs/ViewAPIBaseResponse.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="ApiKeyAuth"></a>
### ApiKeyAuth

- **Type**: API key
- **API key parameter name**: apikey
- **Location**: HTTP header


## Author

support@polymarket.com