swagger

package
v0.0.0-...-36841a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for swagger

This documentation describes Kalshi's rest API for market makers # Authentication

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://trading-api.kalshi.com/v1

Class Method HTTP request Description
AccountApi ChangeSubscription Patch /users/{user_id}/subscribe ChangeSubscription
AccountApi GetNotificationPreferences Get /users/{user_id}/notifications/preferences GetNotificationPreferences
AccountApi NotificationMarkRead Put /users/{user_id}/notifications/{notification_id}/read NotificationMarkRead
AccountApi UserGetAccountHistory Get /users/{user_id}/account/history UserGetAccountHistory
AccountApi UserGetNotifications Get /users/{user_id}/notifications UserGetNotifications
AccountApi UserGetProfitsAndLosses Get /users/{user_id}/account/pnl UserGetProfitsAndLosses
AuthApi Login Post /log_in Login
AuthApi Logout Post /log_out Logout
AuthApi ResetPassword Post /passwords/reset ResetPassword
AuthApi ResetPasswordConfirm Put /passwords/reset/{code}/confirm ResetPasswordConfirm
DefaultApi GetEventsCached Get /events/ GetEventsCached
DefaultApi GetSeriesList Get /series/ GetSeriesList
DefaultApi GetSeriesListCached Get /cached/series GetSeriesListCached
DefaultApi GetTrades Get /trades GetTrades
EventsApi GetEventByTickerCached Get /events/{ticker} GetEventByTickerCached
ExchangeApi GetExchangeStatus Get /exchange/status
MarketApi GetActiveMarkets Get /active_markets GetActiveMarkets
MarketApi GetCandlestickMarketHistory Get /markets/{market_id}/candlestick GetCandlestickMarketHistory
MarketApi GetCandlestickMarketHistoryCached Get /cached/markets/{market_id}/candlestick GetCandlestickMarketHistoryCached
MarketApi GetMarket Get /markets/{market_id} GetMarket
MarketApi GetMarketByTicker Get /markets_by_ticker/{ticker_name} GetMarketByTicker
MarketApi GetMarketByTickerCached Get /cached/markets_by_ticker/{ticker_name} GetMarketByTickerCached
MarketApi GetMarketCached Get /cached/markets/{market_id} GetMarketCached
MarketApi GetMarketHistory Get /markets/{market_id}/stats_history GetMarketHistory
MarketApi GetMarketHistoryCached Get /cached/markets/{market_id}/stats_history GetMarketHistoryCached
MarketApi GetMarketOrderBook Get /markets/{market_id}/order_book GetMarketOrderBook
MarketApi GetMarketOrderBookCached Get /cached/markets/{market_id}/order_book GetMarketOrderBookCached
MarketApi GetMarkets Get /markets GetMarkets
MarketApi GetMarketsCached Get /cached/markets GetMarketsCached
PortfolioApi UserGetPortfolioHistory Get /users/{user_id}/portfolio/history UserGetPortfolioHistory
RangedMarketApi GetRangedMarket Get /ranged_markets/{ranged_market_id} GetRangedMarket
RangedMarketsApi GetRangedMarketByTicker Get /ranged_markets_by_ticker/{ticker} GetRangedMarketByTicker
RangedMarketsApi UserGetRangedMarketPosition Get /users/{user_id}/ranged_positions/{ranged_market_id} UserGetRangedMarketPosition
SeriesApi GetSeriesByTicker Get /series/{series_ticker} GetSeriesByTicker
UserApi UserAddWatchlist Put /users/{user_id}/watchlist/{market_id} UserAddWatchlist
UserApi UserBatchOrdersCancel Delete /users/{user_id}/batch_orders UserBatchOrdersCancel
UserApi UserBatchOrdersCreate Post /users/{user_id}/batch_orders UserBatchOrdersCreate
UserApi UserChangePassword Put /users/{user_id}/password UserChangePassword
UserApi UserDeactivate Delete /users UserDeactivate
UserApi UserGetBalance Get /users/{user_id}/balance UserGetBalance
UserApi UserGetMarketPosition Get /users/{user_id}/positions/{market_id} UserGetMarketPosition
UserApi UserGetMarketPositions Get /users/{user_id}/positions UserGetMarketPositions
UserApi UserGetProfile Get /users/{user_id} UserGetProfile
UserApi UserGetReferralInfo Get /users/{user_id}/referrals UserGetReferralInfo
UserApi UserGetWatchlist Get /users/{user_id}/watchlist UserGetWatchlist
UserApi UserOrderCancel Delete /users/{user_id}/orders/{order_id} UserOrderCancel
UserApi UserOrderCreate Post /users/{user_id}/orders UserOrderCreate
UserApi UserOrderDecrease Post /users/{user_id}/orders/{order_id}/decrease UserOrderDecrease
UserApi UserOrdersGet Get /users/{user_id}/orders UserOrdersGet
UserApi UserRemoveWatchlist Delete /users/{user_id}/watchlist/{market_id} UserRemoveWatchlist
UserApi UserTradesGet Get /users/{user_id}/trades UserTradesGet
UsersApi GetUserImmediateFunding Get /users/{user_id}/immediate_funding GetUserImmediateFunding
UsersApi GetUserWithdrawalAvailableBalance Get /users/{user_id}/withdrawals/available GetUserWithdrawalAvailableBalance

Documentation For Models

Documentation For Authorization

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

Documentation

Overview

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Kalshi API. * * This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> * * API version: 1.0.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AccountApi *AccountApiService

	AuthApi *AuthApiService

	DefaultApi *DefaultApiService

	EventsApi *EventsApiService

	ExchangeApi *ExchangeApiService

	MarketApi *MarketApiService

	PortfolioApi *PortfolioApiService

	RangedMarketApi *RangedMarketApiService

	RangedMarketsApi *RangedMarketsApiService

	SeriesApi *SeriesApiService

	UserApi *UserApiService

	UsersApi *UsersApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Kalshi API. API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AccountApiChangeSubscriptionOpts

type AccountApiChangeSubscriptionOpts struct {
	Body optional.Interface
}

type AccountApiService

type AccountApiService service

func (*AccountApiService) ChangeSubscription

func (a *AccountApiService) ChangeSubscription(ctx context.Context, userId string, localVarOptionals *AccountApiChangeSubscriptionOpts) (ChangeSubscriptionResponse, *http.Response, error)

func (*AccountApiService) GetNotificationPreferences

func (a *AccountApiService) GetNotificationPreferences(ctx context.Context, userId string) (GetNotificationPreferencesResponse, *http.Response, error)

AccountApiService GetNotificationPreferences End-point for getting e-mail subscription mode for the current user. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId This parameter should be filled with your user_id provided on log_in

@return GetNotificationPreferencesResponse

func (*AccountApiService) NotificationMarkRead

func (a *AccountApiService) NotificationMarkRead(ctx context.Context, userId string, notificationId string) (*http.Response, error)

AccountApiService NotificationMarkRead End-point for marking a notification as read. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the notification_id path parameter should match the notification_id value of the notification to be marked as read.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId user_id should be filled with your user_id provided on log_in
  • @param notificationId notification_id should be filled with the id of the notification to be mark as read

func (*AccountApiService) UserGetAccountHistory

func (a *AccountApiService) UserGetAccountHistory(ctx context.Context, userId string, localVarOptionals *AccountApiUserGetAccountHistoryOpts) (UserGetAccountHistoryResponse, *http.Response, error)

func (*AccountApiService) UserGetNotifications

func (a *AccountApiService) UserGetNotifications(ctx context.Context, userId string, pageSize int64, pageNumber int64) (UserGetNotificationsResponse, *http.Response, error)

AccountApiService UserGetNotifications End-point for getting notifications for the current logged in user. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId This parameter should be filled with your user_id provided on log_in
  • @param pageSize Number of results per page
  • @param pageNumber Page of the results

@return UserGetNotificationsResponse

func (*AccountApiService) UserGetProfitsAndLosses

func (a *AccountApiService) UserGetProfitsAndLosses(ctx context.Context, userId string, localVarOptionals *AccountApiUserGetProfitsAndLossesOpts) (int64, *http.Response, error)

type AccountApiUserGetAccountHistoryOpts

type AccountApiUserGetAccountHistoryOpts struct {
	Deposits    optional.Bool
	Withdrawals optional.Bool
	Orders      optional.Bool
	Settlements optional.Bool
	Trades      optional.Bool
	Credits     optional.Bool
	Limit       optional.Int64
	PageSize    optional.Int64
	PageNumber  optional.Int64
}

type AccountApiUserGetProfitsAndLossesOpts

type AccountApiUserGetProfitsAndLossesOpts struct {
	StartTs optional.Int64
	EndTs   optional.Int64
}

type AccountHistoryEntry

type AccountHistoryEntry struct {
	Data *AccountHistoryEntryData `json:"data,omitempty"`
	// Type of entry, one of Deposit, Withdrawal, Order, or Settlement
	Type_ string `json:"type"`
}

type AccountHistoryEntryData

type AccountHistoryEntryData struct {
	Credit     *CreditHistory     `json:"Credit,omitempty"`
	Deposit    *DepositHistory    `json:"Deposit,omitempty"`
	Order      *OrderHistory      `json:"Order,omitempty"`
	Settlement *SettlementHistory `json:"Settlement,omitempty"`
	Trade      *TradeHistory      `json:"Trade,omitempty"`
	Withdrawal *WithdrawalHistory `json:"Withdrawal,omitempty"`
}

type AuthApiLoginOpts

type AuthApiLoginOpts struct {
	Body optional.Interface
}

type AuthApiResetPasswordConfirmOpts

type AuthApiResetPasswordConfirmOpts struct {
	Body optional.Interface
}

type AuthApiResetPasswordOpts

type AuthApiResetPasswordOpts struct {
	Body optional.Interface
}

type AuthApiService

type AuthApiService service

func (*AuthApiService) Login

func (a *AuthApiService) Login(ctx context.Context, localVarOptionals *AuthApiLoginOpts) (LoginResponse, *http.Response, error)

func (*AuthApiService) Logout

func (a *AuthApiService) Logout(ctx context.Context) (*http.Response, error)

AuthApiService Logout End-point to terminates your session with Kalshi.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

func (*AuthApiService) ResetPassword

func (a *AuthApiService) ResetPassword(ctx context.Context, localVarOptionals *AuthApiResetPasswordOpts) (*http.Response, error)

func (*AuthApiService) ResetPasswordConfirm

func (a *AuthApiService) ResetPasswordConfirm(ctx context.Context, code string, localVarOptionals *AuthApiResetPasswordConfirmOpts) (*http.Response, error)

type BankAccountDetails

type BankAccountDetails struct {
	BankId               string `json:"bank_id"`
	Mask                 string `json:"mask"`
	Name                 string `json:"name"`
	PlaidItemNeedsRelink bool   `json:"plaid_item_needs_relink"`
	RoutingNumber        string `json:"routing_number,omitempty"`
	Subtype              string `json:"subtype"`
	Type_                string `json:"type"`
}

Encapsulates meta-data of bank accounts. This is not stored within Kalshi, it is always proxied from the clearing house.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type ChangeSubscriptionRequest

type ChangeSubscriptionRequest struct {
	PushPreferences bool `json:"push_preferences,omitempty"`
	// Specifies the subscription level for email notifications its values can be: \"none\", \"basic\" or \"all\"
	SubscriptionLevel string `json:"subscription_level"`
}

type ChangeSubscriptionResponse

type ChangeSubscriptionResponse struct {
	Preferences *SubscriptionPreference `json:"preferences"`
}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type ConfirmPasswordResetRequest

type ConfirmPasswordResetRequest struct {
	// The new password.
	Password string `json:"password"`
	// UserUUID for your user. You can get this from the password reset link query parameter.
	UserId string `json:"user_id"`
}

type CreateUserRequest

type CreateUserRequest struct {
	// A valid email for the new user.
	Email string `json:"email"`
	// Password for the new user account.
	Password string `json:"password"`
}

type CreateUserResponse

type CreateUserResponse struct {
	// swagger: ignore
	Code string `json:"code,omitempty"`
	// user_id for the created user.
	UserId string `json:"user_id"`
}

Response for submitting an order

type CreditHistory

type CreditHistory struct {
	AmountCents int64     `json:"amount_cents,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
	Reason      string    `json:"reason,omitempty"`
	Status      string    `json:"status,omitempty"`
	Type_       string    `json:"type,omitempty"`
}

type DefaultApiGetTradesOpts

type DefaultApiGetTradesOpts struct {
	TradesDate optional.String
	PageSize   optional.Int64
	PageNumber optional.Int64
	MarketId   optional.String
}

type DefaultApiService

type DefaultApiService service

func (*DefaultApiService) GetEventsCached

func (a *DefaultApiService) GetEventsCached(ctx context.Context) (GetEventsResponse, *http.Response, error)

DefaultApiService GetEventsCached End-point for getting data about all events with data that is cached and so slightly lagged.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetEventsResponse

func (*DefaultApiService) GetSeriesList

DefaultApiService GetSeriesList End-point for getting data about all series

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetSeriesListResponse

func (*DefaultApiService) GetSeriesListCached

func (a *DefaultApiService) GetSeriesListCached(ctx context.Context) (GetSeriesListResponse, *http.Response, error)

DefaultApiService GetSeriesListCached End-point for getting data about all series. Endpoint is cached so it is slightly lagged.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetSeriesListResponse

func (*DefaultApiService) GetTrades

func (a *DefaultApiService) GetTrades(ctx context.Context, localVarOptionals *DefaultApiGetTradesOpts) (TradesGetResponse, *http.Response, error)

type Deposit

type Deposit struct {
	AmountCents     int64     `json:"amount_cents,omitempty"`
	BankId          string    `json:"bank_id,omitempty"`
	CreatedTs       time.Time `json:"created_ts,omitempty"`
	DepositType     string    `json:"deposit_type,omitempty"`
	Id              string    `json:"id,omitempty"`
	ImmediateAmount int64     `json:"immediate_amount,omitempty"`
	ImmediateStatus string    `json:"immediate_status,omitempty"`
	ReturnCode      string    `json:"return_code,omitempty"`
	ReturnReason    string    `json:"return_reason,omitempty"`
	Status          string    `json:"status,omitempty"`
	UserId          string    `json:"user_id,omitempty"`
}

Represents a deposit.

type DepositHistory

type DepositHistory struct {
	Amount          int64     `json:"amount,omitempty"`
	CreatedAt       time.Time `json:"created_at,omitempty"`
	DepositType     string    `json:"deposit_type,omitempty"`
	Fee             int64     `json:"fee,omitempty"`
	ImmediateAmount int64     `json:"immediate_amount,omitempty"`
	ImmediateStatus string    `json:"immediate_status,omitempty"`
	ReturnedAmount  int64     `json:"returned_amount,omitempty"`
	Status          string    `json:"status,omitempty"`
	UpdatedAt       time.Time `json:"updated_at,omitempty"`
}

Represents a deposit account history item

type EventChildMarket

type EventChildMarket struct {
	CanCloseEarly      bool              `json:"can_close_early,omitempty"`
	CloseDate          time.Time         `json:"close_date,omitempty"`
	CloseUnconfirmed   bool              `json:"close_unconfirmed,omitempty"`
	CreateDate         time.Time         `json:"create_date,omitempty"`
	DollarOpenInterest int64             `json:"dollar_open_interest,omitempty"`
	DollarRecentVolume int64             `json:"dollar_recent_volume,omitempty"`
	DollarVolume       int64             `json:"dollar_volume,omitempty"`
	ExpirationDate     time.Time         `json:"expiration_date,omitempty"`
	ExpirationValue    string            `json:"expiration_value,omitempty"`
	Id                 string            `json:"id,omitempty"`
	LastPrice          int64             `json:"last_price,omitempty"`
	Liquidity          int64             `json:"liquidity,omitempty"`
	ListDate           time.Time         `json:"list_date,omitempty"`
	MiniTitle          string            `json:"mini_title,omitempty"`
	OpenDate           time.Time         `json:"open_date,omitempty"`
	OpenInterest       int64             `json:"open_interest,omitempty"`
	PreviousPrice      int64             `json:"previous_price,omitempty"`
	PreviousYesAsk     int64             `json:"previous_yes_ask,omitempty"`
	PreviousYesBid     int64             `json:"previous_yes_bid,omitempty"`
	RecentVolume       int64             `json:"recent_volume,omitempty"`
	Result             string            `json:"result,omitempty"`
	RulebookVariables  map[string]string `json:"rulebook_variables,omitempty"`
	Status             string            `json:"status,omitempty"`
	SubTitle           string            `json:"sub_title,omitempty"`
	TickerName         string            `json:"ticker_name,omitempty"`
	Title              string            `json:"title,omitempty"`
	Volume             int64             `json:"volume,omitempty"`
	YesAsk             int64             `json:"yes_ask,omitempty"`
	YesBid             int64             `json:"yes_bid,omitempty"`
}

type EventData

type EventData struct {
	Category              string             `json:"category,omitempty"`
	DescriptionContext    string             `json:"description_context,omitempty"`
	Markets               []EventChildMarket `json:"markets,omitempty"`
	MetricsTags           []string           `json:"metrics_tags,omitempty"`
	MinTickSize           string             `json:"min_tick_size,omitempty"`
	MiniTitle             string             `json:"mini_title,omitempty"`
	MutuallyExclusive     bool               `json:"mutually_exclusive,omitempty"`
	MutuallyExclusiveSide string             `json:"mutually_exclusive_side,omitempty"`
	SeriesTicker          string             `json:"series_ticker,omitempty"`
	SettleDetails         string             `json:"settle_details,omitempty"`
	SettlementSources     []SettlementSource `json:"settlement_sources,omitempty"`
	SubTitle              string             `json:"sub_title,omitempty"`
	Tags                  []string           `json:"tags,omitempty"`
	TargetDatetime        time.Time          `json:"target_datetime,omitempty"`
	Ticker                string             `json:"ticker,omitempty"`
	Title                 string             `json:"title,omitempty"`
	Underlying            string             `json:"underlying,omitempty"`
}

type EventsApiService

type EventsApiService service

func (*EventsApiService) GetEventByTickerCached

func (a *EventsApiService) GetEventByTickerCached(ctx context.Context, ticker string) (GetEventByTickerResponse, *http.Response, error)

EventsApiService GetEventByTickerCached End-point for getting data about an event by its ticker with data that is cached and so slightly lagged.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ticker Should be the ticker of the event

@return GetEventByTickerResponse

type ExchangeApiService

type ExchangeApiService service

func (*ExchangeApiService) GetExchangeStatus

func (a *ExchangeApiService) GetExchangeStatus(ctx context.Context) (*http.Response, error)

ExchangeApiService End-point for getting the exchange status

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GetActiveMarketsResponse

type GetActiveMarketsResponse struct {
	ActiveMarkets []MarketActivity `json:"active_markets,omitempty"`
}

type GetCandlestickMarketHistoryResponse

type GetCandlestickMarketHistoryResponse struct {
	Points []MarketHistoryCandleStickInfo `json:"points"`
}

type GetEventByTickerResponse

type GetEventByTickerResponse struct {
	Event *EventData `json:"event"`
}

type GetEventsResponse

type GetEventsResponse struct {
	Events []EventData `json:"events"`
}

type GetMarketHistoryResponse

type GetMarketHistoryResponse struct {
	MarketStatsPoints []MarketStatsPoint `json:"market_stats_points"`
}

type GetMarketOrderBookResponse

type GetMarketOrderBookResponse struct {
	OrderBook *OrderBook `json:"order_book"`
}

type GetNotificationPreferencesResponse

type GetNotificationPreferencesResponse struct {
	Preferences *SubscriptionPreference `json:"preferences"`
}

type GetRangedMarketByTickerResponse

type GetRangedMarketByTickerResponse struct {
	RangedMarkets *RangedMarket `json:"ranged_markets"`
}

type GetRangedMarketResponse

type GetRangedMarketResponse struct {
	RangedMarket *RangedMarket `json:"ranged_market"`
}

type GetRangedMarketsResponse

type GetRangedMarketsResponse struct {
	RangedMarkets []RangedMarket `json:"ranged_markets"`
}

type GetSeriesByTickerResponse

type GetSeriesByTickerResponse struct {
	Series *Series `json:"series,omitempty"`
}

type GetSeriesListResponse

type GetSeriesListResponse struct {
	Series []Series `json:"series,omitempty"`
}

type GetUserDepositsResponse

type GetUserDepositsResponse struct {
	// List of previous deposits for the user
	Deposits []Deposit `json:"deposits"`
}

type GetUserImmediateFundingResponse

type GetUserImmediateFundingResponse struct {
	DepositFeeCents          int64 `json:"deposit_fee_cents"`
	ImmediateAmountBeingUsed int64 `json:"immediate_amount_being_used"`
	ImmediateAmountRemaining int64 `json:"immediate_amount_remaining"`
	ImmediateDepositAmount   int64 `json:"immediate_deposit_amount"`
}

type GetUserWithdrawalsResponse

type GetUserWithdrawalsResponse struct {
	// List of previous withdrawals for the user
	Withdrawals []Withdrawal `json:"withdrawals"`
}

type JsonError

type JsonError struct {
	Code    string `json:"code,omitempty"`
	Details string `json:"details,omitempty"`
	Message string `json:"message,omitempty"`
	Service string `json:"service,omitempty"`
}

type LoginRequest

type LoginRequest struct {
	// Email should be used as login identification credentials.
	Email string `json:"email"`
	// Password defined in the first step of the sign-up.
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	// Access level, to limit the access that applicants have
	AccessLevel string `json:"access_level"`
	// Access token for an member role session in the api
	Token string `json:"token"`
	// Your user_id, this will be required in all requests under the /users prefix
	UserId string `json:"user_id"`
}

Response for login request

type Market

type Market struct {
	CanCloseEarly          bool               `json:"can_close_early,omitempty"`
	Category               string             `json:"category,omitempty"`
	CloseDate              time.Time          `json:"close_date,omitempty"`
	CloseUnconfirmed       bool               `json:"close_unconfirmed,omitempty"`
	CreateDate             time.Time          `json:"create_date,omitempty"`
	DescriptionCaseNo      string             `json:"description_case_no,omitempty"`
	DescriptionCaseYes     string             `json:"description_case_yes,omitempty"`
	DescriptionContext     string             `json:"description_context,omitempty"`
	DollarOpenInterest     int64              `json:"dollar_open_interest,omitempty"`
	DollarRecentVolume     int64              `json:"dollar_recent_volume,omitempty"`
	DollarVolume           int64              `json:"dollar_volume,omitempty"`
	ExpirationDate         time.Time          `json:"expiration_date,omitempty"`
	ExpirationValue        string             `json:"expiration_value,omitempty"`
	FrequencyInDays        int32              `json:"frequency_in_days,omitempty"`
	Id                     string             `json:"id,omitempty"`
	ImageUrl               string             `json:"image_url,omitempty"`
	LastPrice              int64              `json:"last_price,omitempty"`
	Liquidity              int64              `json:"liquidity,omitempty"`
	ListDate               time.Time          `json:"list_date,omitempty"`
	MetricsTags            []string           `json:"metrics_tags,omitempty"`
	MinTickSize            string             `json:"min_tick_size,omitempty"`
	MiniTitle              string             `json:"mini_title,omitempty"`
	OpenDate               time.Time          `json:"open_date,omitempty"`
	OpenInterest           int64              `json:"open_interest,omitempty"`
	OptionType             string             `json:"option_type,omitempty"`
	OriginalExpirationDate time.Time          `json:"original_expiration_date,omitempty"`
	PreviousPrice          int64              `json:"previous_price,omitempty"`
	PreviousYesAsk         int64              `json:"previous_yes_ask,omitempty"`
	PreviousYesBid         int64              `json:"previous_yes_bid,omitempty"`
	RangedGroupName        string             `json:"ranged_group_name,omitempty"`
	RangedGroupTicker      string             `json:"ranged_group_ticker,omitempty"`
	RecentVolume           int64              `json:"recent_volume,omitempty"`
	Result                 string             `json:"result,omitempty"`
	RulebookVariables      map[string]string  `json:"rulebook_variables,omitempty"`
	SettleDetails          string             `json:"settle_details,omitempty"`
	SettlementSources      []SettlementSource `json:"settlement_sources,omitempty"`
	Status                 string             `json:"status,omitempty"`
	StrikePrice            float64            `json:"strike_price,omitempty"`
	SubTitle               string             `json:"sub_title,omitempty"`
	Tags                   []string           `json:"tags,omitempty"`
	TickerName             string             `json:"ticker_name,omitempty"`
	Title                  string             `json:"title,omitempty"`
	Underlying             string             `json:"underlying,omitempty"`
	Volume                 int64              `json:"volume,omitempty"`
	YesAsk                 int64              `json:"yes_ask,omitempty"`
	YesBid                 int64              `json:"yes_bid,omitempty"`
}

Market details

type MarketActivity

type MarketActivity struct {
	CloseDate      time.Time `json:"close_date,omitempty"`
	MarketId       string    `json:"market_id,omitempty"`
	OpenDate       time.Time `json:"open_date,omitempty"`
	PriceChange    int64     `json:"price_change,omitempty"`
	Ticker         string    `json:"ticker,omitempty"`
	VolumeIncrease int32     `json:"volume_increase,omitempty"`
}

type MarketApiGetActiveMarketsOpts

type MarketApiGetActiveMarketsOpts struct {
	Limit   optional.Int64
	MinDate optional.Int64
	MaxDate optional.Int64
}

type MarketApiGetCandlestickMarketHistoryCachedOpts

type MarketApiGetCandlestickMarketHistoryCachedOpts struct {
	LastSeenTs optional.Int64
	NumBuckets optional.Int32
}

type MarketApiGetCandlestickMarketHistoryOpts

type MarketApiGetCandlestickMarketHistoryOpts struct {
	LastSeenTs optional.Int64
	NumBuckets optional.Int32
}

type MarketApiGetMarketHistoryCachedOpts

type MarketApiGetMarketHistoryCachedOpts struct {
	LastSeenTs optional.Int64
	NumBuckets optional.Int32
}

type MarketApiGetMarketHistoryOpts

type MarketApiGetMarketHistoryOpts struct {
	LastSeenTs optional.Int64
	NumBuckets optional.Int32
}

type MarketApiService

type MarketApiService service

func (*MarketApiService) GetActiveMarkets

func (*MarketApiService) GetCandlestickMarketHistory

func (a *MarketApiService) GetCandlestickMarketHistory(ctx context.Context, marketId string, localVarOptionals *MarketApiGetCandlestickMarketHistoryOpts) (GetCandlestickMarketHistoryResponse, *http.Response, error)

func (*MarketApiService) GetCandlestickMarketHistoryCached

func (a *MarketApiService) GetCandlestickMarketHistoryCached(ctx context.Context, marketId string, localVarOptionals *MarketApiGetCandlestickMarketHistoryCachedOpts) (GetCandlestickMarketHistoryResponse, *http.Response, error)

func (*MarketApiService) GetMarket

MarketApiService GetMarket End-point for getting data about a specific market. The value for the market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param marketId Should be filled with the id of the target market

@return UserGetMarketResponse

func (*MarketApiService) GetMarketByTicker

func (a *MarketApiService) GetMarketByTicker(ctx context.Context, tickerName string) (UserGetMarketResponse, *http.Response, error)

MarketApiService GetMarketByTicker End-point for getting data about a specific market based on its ticker. The value for the ticker_name path parameter should match the ticker_name value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tickerName Should be filled with the ticker name of the target market

@return UserGetMarketResponse

func (*MarketApiService) GetMarketByTickerCached

func (a *MarketApiService) GetMarketByTickerCached(ctx context.Context, tickerName string) (UserGetMarketResponse, *http.Response, error)

MarketApiService GetMarketByTickerCached End-point for getting data about a specific market with data that is cached and so slightly lagged. The value for the ticker_name path parameter should match the ticker_name value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tickerName Should be filled with the ticker name of the target market

@return UserGetMarketResponse

func (*MarketApiService) GetMarketCached

func (a *MarketApiService) GetMarketCached(ctx context.Context, marketId string) (UserGetMarketResponse, *http.Response, error)

MarketApiService GetMarketCached End-point for getting data about a specific market with data that is cached and so slightly lagged. The value for the market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param marketId Should be filled with the id of the target market

@return UserGetMarketResponse

func (*MarketApiService) GetMarketHistory

func (a *MarketApiService) GetMarketHistory(ctx context.Context, marketId string, localVarOptionals *MarketApiGetMarketHistoryOpts) (GetMarketHistoryResponse, *http.Response, error)

func (*MarketApiService) GetMarketHistoryCached

func (a *MarketApiService) GetMarketHistoryCached(ctx context.Context, marketId string, localVarOptionals *MarketApiGetMarketHistoryCachedOpts) (GetMarketHistoryResponse, *http.Response, error)

func (*MarketApiService) GetMarketOrderBook

func (a *MarketApiService) GetMarketOrderBook(ctx context.Context, marketId string) (GetMarketOrderBookResponse, *http.Response, error)

MarketApiService GetMarketOrderBook End-point for getting the orderbook for a market. The value for the market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param marketId Should be filled with the id of the target market

@return GetMarketOrderBookResponse

func (*MarketApiService) GetMarketOrderBookCached

func (a *MarketApiService) GetMarketOrderBookCached(ctx context.Context, marketId string) (GetMarketOrderBookResponse, *http.Response, error)

MarketApiService GetMarketOrderBookCached End-point for getting the orderbook for a market with data that is cached and so slightly lagged. The value for the market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param marketId Should be filled with the id of the target market

@return GetMarketOrderBookResponse

func (*MarketApiService) GetMarkets

MarketApiService GetMarkets End-point for listing / discovering markets on Kalshi.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return UserGetMarketsResponse

func (*MarketApiService) GetMarketsCached

MarketApiService GetMarketsCached End-point for listing / discovering markets on Kalshi with data that is cached and so slightly lagged.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return UserGetMarketsResponse

type MarketHistoryCandleStickInfo

type MarketHistoryCandleStickInfo struct {
	EndTs        int64  `json:"EndTs,omitempty"`
	OpenInterest int64  `json:"OpenInterest,omitempty"`
	Price        *Olhcm `json:"Price,omitempty"`
	StartTs      int64  `json:"StartTs,omitempty"`
	Volume       int64  `json:"Volume,omitempty"`
	YesAsk       *Olhcm `json:"YesAsk,omitempty"`
	YesBid       *Olhcm `json:"YesBid,omitempty"`
}

type MarketPosition

type MarketPosition struct {
	FeesPaid int64 `json:"fees_paid,omitempty"`
	// Settlement stats
	FinalPosition     int32  `json:"final_position,omitempty"`
	FinalPositionCost int64  `json:"final_position_cost,omitempty"`
	IsSettled         bool   `json:"is_settled,omitempty"`
	MarketId          string `json:"market_id,omitempty"`
	// Current stats
	Position           int32  `json:"position,omitempty"`
	PositionCost       int64  `json:"position_cost,omitempty"`
	RealizedPnl        int64  `json:"realized_pnl,omitempty"`
	RestingOrdersCount int32  `json:"resting_orders_count,omitempty"`
	TotalCost          int64  `json:"total_cost,omitempty"`
	UserId             string `json:"user_id,omitempty"`
	Volume             int32  `json:"volume,omitempty"`
}

MarketPosition is your accumulated position on a specific market considering all orders and trades.

type MarketStatsPoint

type MarketStatsPoint struct {
	DollarOpenInterest int64 `json:"dollar_open_interest,omitempty"`
	DollarVolume       int64 `json:"dollar_volume,omitempty"`
	OpenInterest       int64 `json:"open_interest,omitempty"`
	Price              int64 `json:"price,omitempty"`
	Ts                 int64 `json:"ts,omitempty"`
	Volume             int64 `json:"volume,omitempty"`
	YesAsk             int64 `json:"yes_ask,omitempty"`
	YesBid             int64 `json:"yes_bid,omitempty"`
}

type MarketTransaction

type MarketTransaction struct {
	AveragePrice            int64     `json:"average_price,omitempty"`
	Fee                     int64     `json:"fee,omitempty"`
	IsSideYes               bool      `json:"is_side_yes,omitempty"`
	MarketId                string    `json:"market_id,omitempty"`
	MarketTicker            string    `json:"market_ticker,omitempty"`
	MarketTitle             string    `json:"market_title,omitempty"`
	NumContracts            int64     `json:"num_contracts,omitempty"`
	RealizedCostOfContracts int64     `json:"realized_cost_of_contracts,omitempty"`
	RealizedFifoProfit      int64     `json:"realized_fifo_profit,omitempty"`
	RealizedRevenue         int64     `json:"realized_revenue,omitempty"`
	Time                    time.Time `json:"time,omitempty"`
	Type_                   string    `json:"type,omitempty"`
}

type Notification

type Notification struct {
	Content     map[string]interface{} `json:"content,omitempty"`
	CreatedTs   time.Time              `json:"created_ts,omitempty"`
	Id          string                 `json:"id,omitempty"`
	IsDelivered bool                   `json:"is_delivered,omitempty"`
	IsRead      bool                   `json:"is_read,omitempty"`
	Link        string                 `json:"link,omitempty"`
	Type_       string                 `json:"type,omitempty"`
	UserId      string                 `json:"user_id,omitempty"`
}

type Olhcm

type Olhcm struct {
	Close int64 `json:"close,omitempty"`
	High  int64 `json:"high,omitempty"`
	Low   int64 `json:"low,omitempty"`
	Mean  int64 `json:"mean,omitempty"`
	Open  int64 `json:"open,omitempty"`
}

type Order

type Order struct {
	CloseCancelCount int32     `json:"close_cancel_count,omitempty"`
	CreateTs         time.Time `json:"create_ts,omitempty"`
	DecreaseCount    int32     `json:"decrease_count,omitempty"`
	ExpirationTs     time.Time `json:"expiration_ts,omitempty"`
	ExtraCost        int64     `json:"extra_cost,omitempty"`
	ExtraCount       int32     `json:"extra_count,omitempty"`
	FccCancelCount   int32     `json:"fcc_cancel_count,omitempty"`
	IsYes            bool      `json:"is_yes,omitempty"`
	LastUpdateOp     string    `json:"last_update_op,omitempty"`
	MakerFillCount   int32     `json:"maker_fill_count,omitempty"`
	MarketId         string    `json:"market_id,omitempty"`
	OrderId          string    `json:"order_id,omitempty"`
	PlaceCount       int32     `json:"place_count,omitempty"`
	Price            int64     `json:"price,omitempty"`
	QueuePosition    int32     `json:"queue_position,omitempty"`
	RemainingCount   int32     `json:"remaining_count,omitempty"`
	Status           string    `json:"status,omitempty"`
	TakerFees        int64     `json:"taker_fees,omitempty"`
	TakerFillCost    int64     `json:"taker_fill_cost,omitempty"`
	TakerFillCount   int32     `json:"taker_fill_count,omitempty"`
	UserId           string    `json:"user_id,omitempty"`
}

Represents user orders in the api. When an order is matched multiple trades can be created this can be tracked by looking into the trade.order_id field.

type OrderBook

type OrderBook struct {
	No  [][]int32 `json:"no"`
	Yes [][]int32 `json:"yes"`
}

OrderBook Contains the number of pending resting order for each price on a specific market.

type OrderHistory

type OrderHistory struct {
	CanceledCount    int64     `json:"canceled_count,omitempty"`
	CloseCancelCount int64     `json:"close_cancel_count,omitempty"`
	CreatedAt        time.Time `json:"created_at,omitempty"`
	FccCanceledCount int64     `json:"fcc_canceled_count,omitempty"`
	FilledCount      int64     `json:"filled_count,omitempty"`
	IsYes            bool      `json:"is_yes,omitempty"`
	MarketId         string    `json:"market_id,omitempty"`
	MarketTitle      string    `json:"market_title,omitempty"`
	OriginalCount    int64     `json:"original_count,omitempty"`
	Price            int64     `json:"price,omitempty"`
	RemainingCount   int64     `json:"remaining_count,omitempty"`
	UpdatedAt        time.Time `json:"updated_at,omitempty"`
}

type PeopleReferred

type PeopleReferred struct {
	Email                    string    `json:"email,omitempty"`
	ReferralId               string    `json:"referral_id,omitempty"`
	StageInFunnel            string    `json:"stage_in_funnel,omitempty"`
	TimeOfReferralExpiration time.Time `json:"time_of_referral_expiration,omitempty"`
}

type PortfolioApiService

type PortfolioApiService service

func (*PortfolioApiService) UserGetPortfolioHistory

type PortfolioApiUserGetPortfolioHistoryOpts

type PortfolioApiUserGetPortfolioHistoryOpts struct {
	Body optional.Interface
}

type PortfolioMeasurement

type PortfolioMeasurement struct {
	A                  int64 `json:"a"`
	BalanceChange      int64 `json:"balance_change,omitempty"`
	CumulativeDeposits int64 `json:"cumulative_deposits"`
	// Count of settlements member has had from account creation to timestamp (inclusive)
	CumulativeNumberSettlements int64 `json:"cumulative_number_settlements"`
	CumulativeWithdrawals       int64 `json:"cumulative_withdrawals"`
	// Reason for the portfolio value change, if applicable
	Reason string `json:"reason,omitempty"`
	// Timestamp of the read in UNIX timestamp. (https://www.unixtimestamp.com/)
	Ts int64 `json:"ts"`
	V  int64 `json:"v"`
}

Portfolio measurement is simply a snapshot of the portfolio of a user on a timestamp.

type PublicTrade

type PublicTrade struct {
	Count      int32     `json:"count,omitempty"`
	CreateDate time.Time `json:"create_date,omitempty"`
	MarketId   string    `json:"market_id,omitempty"`
	Price      int64     `json:"price,omitempty"`
	TradeId    string    `json:"trade_id,omitempty"`
}

Represents a trade that can be displayed publicly. This does not include maker and taker information. A trade is created whenever an order is fully or partially matched.

type RangedMarket

type RangedMarket struct {
	Id                    string `json:"id,omitempty"`
	MiniTitle             string `json:"mini_title,omitempty"`
	MutuallyExclusiveSide string `json:"mutually_exclusive_side,omitempty"`
	Ticker                string `json:"ticker,omitempty"`
	Title                 string `json:"title,omitempty"`
}

type RangedMarketApiService

type RangedMarketApiService service

func (*RangedMarketApiService) GetRangedMarket

func (a *RangedMarketApiService) GetRangedMarket(ctx context.Context, rangedMarketId string) (GetRangedMarketResponse, *http.Response, error)

RangedMarketApiService GetRangedMarket End-point for getting data about a ranged market

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param rangedMarketId Should be filled in with a ranged market id

@return GetRangedMarketResponse

type RangedMarketPosition

type RangedMarketPosition struct {
	CollateralReturnedCents int64            `json:"collateral_returned_cents,omitempty"`
	MarketPositions         []MarketPosition `json:"market_positions,omitempty"`
	RangedMarketId          string           `json:"ranged_market_id,omitempty"`
	UserId                  string           `json:"user_id,omitempty"`
}

type RangedMarketsApiService

type RangedMarketsApiService service

func (*RangedMarketsApiService) GetRangedMarketByTicker

func (a *RangedMarketsApiService) GetRangedMarketByTicker(ctx context.Context, ticker string) (GetRangedMarketByTickerResponse, *http.Response, error)

RangedMarketsApiService GetRangedMarketByTicker End-point for getting data about a ranged market by its ticker

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ticker Should be the ticker of the ranged market

@return GetRangedMarketByTickerResponse

func (*RangedMarketsApiService) UserGetRangedMarketPosition

func (a *RangedMarketsApiService) UserGetRangedMarketPosition(ctx context.Context, userId string, rangedMarketId string) (UserGetRangedMarketPositionResponse, *http.Response, error)

RangedMarketsApiService UserGetRangedMarketPosition End-point for getting the market positions and additional data for the logged in user for all markets whose results linked by a single outcome. These markets share a parameter ranged_market_id, which indicates their relationship with each other. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the ranged_market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled in with your user_id provided on log_in
  • @param rangedMarketId Should be filled with the id of the target ranged market

@return UserGetRangedMarketPositionResponse

type ResetPasswordRequest

type ResetPasswordRequest struct {
	// Email used to create your account
	Email string `json:"email"`
}

type Series

type Series struct {
	FirstOpenDate time.Time `json:"first_open_date,omitempty"`
	Frequency     string    `json:"frequency,omitempty"`
	Ticker        string    `json:"ticker,omitempty"`
	Title         string    `json:"title,omitempty"`
}

type SeriesApiService

type SeriesApiService service

func (*SeriesApiService) GetSeriesByTicker

func (a *SeriesApiService) GetSeriesByTicker(ctx context.Context, seriesTicker string) (GetSeriesByTickerResponse, *http.Response, error)

SeriesApiService GetSeriesByTicker End-point for getting data about an event by its ticker

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param seriesTicker Should be the ticker of the series

@return GetSeriesByTickerResponse

type SettlementHistory

type SettlementHistory struct {
	DeterminedTime time.Time `json:"determined_time,omitempty"`
	MarketId       string    `json:"market_id,omitempty"`
	MarketResult   string    `json:"market_result,omitempty"`
	MarketTitle    string    `json:"market_title,omitempty"`
	NoCount        int64     `json:"no_count,omitempty"`
	NoTotalCost    int64     `json:"no_total_cost,omitempty"`
	Profit         int64     `json:"profit,omitempty"`
	SettledTime    time.Time `json:"settled_time,omitempty"`
	YesCount       int64     `json:"yes_count,omitempty"`
	YesTotalCost   int64     `json:"yes_total_cost,omitempty"`
}

type SettlementSource

type SettlementSource struct {
	Name string `json:"name,omitempty"`
	Url  string `json:"url,omitempty"`
}

type SubscriptionPreference

type SubscriptionPreference struct {
	PushPreferences   []string `json:"push_preferences,omitempty"`
	SubscriptionLevel string   `json:"subscription_level,omitempty"`
}

type TradeHistory

type TradeHistory struct {
	Amount      int64     `json:"amount,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
	Fee         int64     `json:"fee,omitempty"`
	IsYes       bool      `json:"is_yes,omitempty"`
	MarketId    string    `json:"market_id,omitempty"`
	MarketTitle string    `json:"market_title,omitempty"`
	Price       int64     `json:"price,omitempty"`
}

type TradesGetResponse

type TradesGetResponse struct {
	Trades *[]PublicTrade `json:"trades"`
}

type User

type User struct {
	AreaCode    string    `json:"area_code,omitempty"`
	BirthDate   string    `json:"birth_date,omitempty"`
	City        string    `json:"city,omitempty"`
	Country     string    `json:"country,omitempty"`
	CountryCode string    `json:"country_code,omitempty"`
	CreatedTs   time.Time `json:"created_ts,omitempty"`
	Email       string    `json:"email,omitempty"`
	FinishedFre bool      `json:"finished_fre,omitempty"`
	FirstName   string    `json:"first_name,omitempty"`
	LastName    string    `json:"last_name,omitempty"`
	PhoneNumber string    `json:"phone_number,omitempty"`
	PostalCode  string    `json:"postal_code,omitempty"`
	State       string    `json:"state,omitempty"`
	Street1     string    `json:"street1,omitempty"`
	Street2     string    `json:"street2,omitempty"`
	UseBidAsk   bool      `json:"use_bid_ask,omitempty"`
	UserId      string    `json:"user_id,omitempty"`
	Watchlist   []string  `json:"watchlist,omitempty"`
	WireCode    string    `json:"wire_code,omitempty"`
}

Represents a user's profile on the api.

type UserApiService

type UserApiService service

func (*UserApiService) UserAddWatchlist

func (a *UserApiService) UserAddWatchlist(ctx context.Context, userId string, marketId string) (*http.Response, error)

UserApiService UserAddWatchlist End-point for adding a market to the logged in user&#x27;s watchlist. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the market_id path parameter should match the id value of the market to be added.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId user_id should be filled with your user_id provided on log_in
  • @param marketId market_id should be filled with the id of the market to be added to the watchlist

func (*UserApiService) UserBatchOrdersCancel

func (a *UserApiService) UserBatchOrdersCancel(ctx context.Context, userId string, localVarOptionals *UserApiUserBatchOrdersCancelOpts) (UserBatchOrdersCancelResponse, *http.Response, error)

func (*UserApiService) UserBatchOrdersCreate

func (a *UserApiService) UserBatchOrdersCreate(ctx context.Context, userId string, localVarOptionals *UserApiUserBatchOrdersCreateOpts) (UserBatchOrdersCreateResponse, *http.Response, error)

func (*UserApiService) UserChangePassword

func (a *UserApiService) UserChangePassword(ctx context.Context, userId string, localVarOptionals *UserApiUserChangePasswordOpts) (*http.Response, error)

func (*UserApiService) UserDeactivate

func (a *UserApiService) UserDeactivate(ctx context.Context) (CreateUserResponse, *http.Response, error)

UserApiService UserDeactivate End-point for deactivating an user. A call to this end-point deactivates the current user and ends the current session.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return CreateUserResponse

func (*UserApiService) UserGetBalance

func (a *UserApiService) UserGetBalance(ctx context.Context, userId string) (UserGetBalanceResponse, *http.Response, error)

UserApiService UserGetBalance End-point for getting the balance of the logged in user. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in

@return UserGetBalanceResponse

func (*UserApiService) UserGetMarketPosition

func (a *UserApiService) UserGetMarketPosition(ctx context.Context, userId string, marketId string) (UserGetMarketPositionResponse, *http.Response, error)

UserApiService UserGetMarketPosition End-point for getting the market positions for the logged in user, in a specific market. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the market_id path parameter should match the id value of the target market.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in
  • @param marketId Should be filled with the id of the target market

@return UserGetMarketPositionResponse

func (*UserApiService) UserGetMarketPositions

func (a *UserApiService) UserGetMarketPositions(ctx context.Context, userId string) (UserGetMarketPositionsResponse, *http.Response, error)

UserApiService UserGetMarketPositions End-point for getting all market positions for the logged in user. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in

@return UserGetMarketPositionsResponse

func (*UserApiService) UserGetProfile

func (a *UserApiService) UserGetProfile(ctx context.Context, userId string) (UserGetProfileResponse, *http.Response, error)

UserApiService UserGetProfile End-point for retrieving the logged in user&#x27;s profile. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in

@return UserGetProfileResponse

func (*UserApiService) UserGetReferralInfo

func (a *UserApiService) UserGetReferralInfo(ctx context.Context, userId string) (UserGetReferralInfoResponse, *http.Response, error)

UserApiService UserGetReferralInfo End-point for getting all information related to a member&#x27;s referral status.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in

@return UserGetReferralInfoResponse

func (*UserApiService) UserGetWatchlist

func (a *UserApiService) UserGetWatchlist(ctx context.Context, userId string) (UserGetWatchlistResponse, *http.Response, error)

UserApiService UserGetWatchlist End-point for getting the market watchlist for the logged in user. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in

@return UserGetWatchlistResponse

func (*UserApiService) UserOrderCancel

func (a *UserApiService) UserOrderCancel(ctx context.Context, userId string, orderId string) (UserOrderDecreaseResponse, *http.Response, error)

UserApiService UserOrderCancel End-point for canceling orders. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the order_id should match the id field of the order you want to decrease. Commonly delete end-points return 204 status with no body content on success. But we can&#x27;t completely delete the order, as it may be partially filled already. So what the delete end-point does is just reducing the order completely zeroing the remaining resting contracts on it. The zeroed order is returned on the response payload, as a form of validation for the client.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId This parameter should be filled with your user_id provided on log_in
  • @param orderId This order_id should be filled with the id of the order to be decrease

@return UserOrderDecreaseResponse

func (*UserApiService) UserOrderCreate

func (a *UserApiService) UserOrderCreate(ctx context.Context, userId string, localVarOptionals *UserApiUserOrderCreateOpts) (UserOrderCreateResponse, *http.Response, error)

func (*UserApiService) UserOrderDecrease

func (a *UserApiService) UserOrderDecrease(ctx context.Context, userId string, orderId string, localVarOptionals *UserApiUserOrderDecreaseOpts) (UserOrderDecreaseResponse, *http.Response, error)

func (*UserApiService) UserOrdersGet

func (a *UserApiService) UserOrdersGet(ctx context.Context, userId string, localVarOptionals *UserApiUserOrdersGetOpts) (UserOrdersGetResponse, *http.Response, error)

func (*UserApiService) UserRemoveWatchlist

func (a *UserApiService) UserRemoveWatchlist(ctx context.Context, userId string, marketId string) (*http.Response, error)

UserApiService UserRemoveWatchlist End-point for removing a market from the logged in user&#x27;s watchlist. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in). The value for the market_id path parameter should match the id value of the market to be added.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId Should be filled with your user_id provided on log_in
  • @param marketId Should be filled with the id of the target market

func (*UserApiService) UserTradesGet

func (a *UserApiService) UserTradesGet(ctx context.Context, userId string, localVarOptionals *UserApiUserTradesGetOpts) (UserTradesGetResponse, *http.Response, error)

type UserApiUserBatchOrdersCancelOpts

type UserApiUserBatchOrdersCancelOpts struct {
	Body optional.Interface
}

type UserApiUserBatchOrdersCreateOpts

type UserApiUserBatchOrdersCreateOpts struct {
	Body optional.Interface
}

type UserApiUserChangePasswordOpts

type UserApiUserChangePasswordOpts struct {
	Body optional.Interface
}

type UserApiUserOrderCreateOpts

type UserApiUserOrderCreateOpts struct {
	Body optional.Interface
}

type UserApiUserOrderDecreaseOpts

type UserApiUserOrderDecreaseOpts struct {
	Body optional.Interface
}

type UserApiUserOrdersGetOpts

type UserApiUserOrdersGetOpts struct {
	MarketId          optional.String
	IsYes             optional.Bool
	MinPrice          optional.Int64
	MaxPrice          optional.Int64
	MinPlaceCount     optional.Int32
	MaxPlaceCount     optional.Int32
	MinInitialCount   optional.Int32
	MaxInitialCount   optional.Int32
	MinRemainingCount optional.Int32
	MaxRemainingCount optional.Int32
	MinDate           optional.Time
	MaxDate           optional.Time
	GetQueuePosition  optional.Bool
	Status            optional.String
	PageSize          optional.Int64
	PageNumber        optional.Int64
}

type UserApiUserTradesGetOpts

type UserApiUserTradesGetOpts struct {
	MarketId   optional.String
	OrderId    optional.String
	MinPrice   optional.Int64
	MaxPrice   optional.Int64
	MinCount   optional.Int32
	MaxCount   optional.Int32
	MinDate    optional.Time
	MaxDate    optional.Time
	PageSize   optional.Int64
	PageNumber optional.Int64
}

type UserBatchOrdersCancelRequest

type UserBatchOrdersCancelRequest struct {
	// An array of order IDs to cancel
	Ids []string `json:"ids"`
}

Request for cancelling a batch of orders

type UserBatchOrdersCancelResponse

type UserBatchOrdersCancelResponse struct {
	// An array of responses corresponding to the orders in the request.
	Orders []UserBatchOrdersCancelSingleOrderResponse `json:"orders"`
}

type UserBatchOrdersCancelSingleOrderResponse

type UserBatchOrdersCancelSingleOrderResponse struct {
	Error_ *JsonError `json:"error,omitempty"`
	// ID of the order
	Id    string `json:"id"`
	Order *Order `json:"order,omitempty"`
	// Result of the decrease operation
	ReducedBy int32 `json:"reduced_by,omitempty"`
}

Response for cancelling a batch of orders

type UserBatchOrdersCreateRequest

type UserBatchOrdersCreateRequest struct {
	// An array of individual orders to place
	Orders []UserOrderCreateRequest `json:"orders"`
}

Request for submitting a batch of orders

type UserBatchOrdersCreateResponse

type UserBatchOrdersCreateResponse struct {
	// An array of responses corresponding to orders in the request.
	Orders []UserBatchOrdersCreateSingleOrderResponse `json:"orders"`
}

Response for submitting a batch of order

type UserBatchOrdersCreateSingleOrderResponse

type UserBatchOrdersCreateSingleOrderResponse struct {
	Error_ *JsonError `json:"error,omitempty"`
	Order  *Order     `json:"order,omitempty"`
	// Status of the order submit operation
	Status string `json:"status,omitempty"`
}

Response for submitting an order

type UserChangePasswordRequest

type UserChangePasswordRequest struct {
	// New password value.
	NewPassword string `json:"new_password"`
	// Old password should be passed as a validation parameter.
	OldPassword string `json:"old_password"`
}

type UserDepositRequest

type UserDepositRequest struct {
	AmountCents int64  `json:"amount_cents"`
	BankId      string `json:"bank_id"`
	FeeCents    int64  `json:"fee_cents"`
}

type UserDepositResponse

type UserDepositResponse struct {
	Deposit *Deposit `json:"deposit,omitempty"`
	// Id for the deposit that was created.
	DepositId string `json:"deposit_id"`
	// The estimated number of days we believe the ach transfer will take
	EstimatedAchTimeDays int32 `json:"estimated_ach_time_days"`
}

type UserGetAccountHistoryResponse

type UserGetAccountHistoryResponse struct {
	// List of account history items for the user
	Entries []AccountHistoryEntry `json:"entries"`
}

type UserGetBalanceResponse

type UserGetBalanceResponse struct {
	Balance int64 `json:"balance"`
}

type UserGetCurrentPortfolioValueResponse

type UserGetCurrentPortfolioValueResponse struct {
	Value *PortfolioMeasurement `json:"value,omitempty"`
}

type UserGetMarketPositionResponse

type UserGetMarketPositionResponse struct {
	MarketPosition *MarketPosition `json:"market_position"`
}

type UserGetMarketPositionsResponse

type UserGetMarketPositionsResponse struct {
	// List of market positions
	MarketPositions []MarketPosition `json:"market_positions"`
}

type UserGetMarketResponse

type UserGetMarketResponse struct {
	Market *Market `json:"market"`
}

type UserGetMarketsResponse

type UserGetMarketsResponse struct {
	Markets []Market `json:"markets"`
}

type UserGetNotificationsResponse

type UserGetNotificationsResponse struct {
	Notifications *[]Notification `json:"notifications"`
}

type UserGetPortfolioHistoryRequest

type UserGetPortfolioHistoryRequest struct {
	// Restricts the response to orders before a timestamp in: query
	MaxDate time.Time `json:"max_date,omitempty"`
	// Restricts the response to orders before a timestamp in unix seconds, overrides max_date, defaults to now. in: query
	MaxTs int64 `json:"max_ts,omitempty"`
	// Restricts the response to orders after a timestamp in: query
	MinDate time.Time `json:"min_date,omitempty"`
	// Restricts the response to orders after a timestamp in unix seconds, overrides min_date, defaults to one hour before now. in: query
	MinTs int64 `json:"min_ts,omitempty"`
	// Determines the number of buckets to average over when performing subsampling, defaults to 1440. in: query
	NumBuckets int32 `json:"num_buckets,omitempty"`
}

Request for fetching user portfolio history

type UserGetPortfolioHistoryResponse

type UserGetPortfolioHistoryResponse struct {
	Values []PortfolioMeasurement `json:"values,omitempty"`
}

type UserGetProfileResponse

type UserGetProfileResponse struct {
	User *User `json:"user"`
}

type UserGetRangedMarketPositionResponse

type UserGetRangedMarketPositionResponse struct {
	RangedMarketPosition *RangedMarketPosition `json:"ranged_market_position"`
}

type UserGetReferralInfoResponse

type UserGetReferralInfoResponse struct {
	EligibleToRefer       bool              `json:"eligible_to_refer,omitempty"`
	NumContractsTraded    int64             `json:"num_contracts_traded,omitempty"`
	PeopleReferred        *[]PeopleReferred `json:"people_referred,omitempty"`
	ReferralCode          string            `json:"referral_code,omitempty"`
	ReferralId            string            `json:"referral_id,omitempty"`
	ReferralMoneyRewarded int64             `json:"referral_money_rewarded,omitempty"`
	StageInFunnel         string            `json:"stage_in_funnel,omitempty"`
}

type UserGetWatchlistResponse

type UserGetWatchlistResponse struct {
	Watchlist *Watchlist `json:"watchlist"`
}

type UserListLedgerxBankAccountsResponse

type UserListLedgerxBankAccountsResponse struct {
	Accounts []BankAccountDetails `json:"accounts"`
}

type UserOrderCreateRequest

type UserOrderCreateRequest struct {
	// Specifies how many contracts should be bought
	Count int32 `json:"count"`
	// Specifies the expiration time of the order, in unix seconds.  If this is not supplied, or is 0, the order won't expire.
	ExpirationUnixTs int64 `json:"expiration_unix_ts,omitempty"`
	// Specifies the id of the market for this order
	MarketId     string `json:"market_id"`
	MaxCostCents int64  `json:"max_cost_cents,omitempty"`
	Price        int64  `json:"price"`
	// Specifies whether the order place count should be capped by the members current position.
	SellPositionCapped bool `json:"sell_position_capped,omitempty"`
	// Specifies if this is a 'yes' or 'no' order
	Side string `json:"side"`
}

Request for submitting an order

type UserOrderCreateResponse

type UserOrderCreateResponse struct {
	Order *Order `json:"order"`
	// Status of the order submit operation
	Status string `json:"status"`
}

Response for submitting an order

type UserOrderDecreaseRequest

type UserOrderDecreaseRequest struct {
	Count int32 `json:"count,omitempty"`
}

type UserOrderDecreaseResponse

type UserOrderDecreaseResponse struct {
	Order *Order `json:"order"`
	// Result of the decrease operation
	ReducedBy int32 `json:"reduced_by"`
}

type UserOrdersGetResponse

type UserOrdersGetResponse struct {
	Orders *[]Order `json:"orders"`
}

type UserTrade

type UserTrade struct {
	Count      int32     `json:"count,omitempty"`
	CreateDate time.Time `json:"create_date,omitempty"`
	Id         string    `json:"id,omitempty"`
	IsTaker    bool      `json:"is_taker,omitempty"`
	IsYes      bool      `json:"is_yes,omitempty"`
	MarketId   string    `json:"market_id,omitempty"`
	OrderId    string    `json:"order_id,omitempty"`
	Price      int64     `json:"price,omitempty"`
	Status     string    `json:"status,omitempty"`
}

Represents a trade from the user perspective. A trade is created whenever an order is fully or partially matched, so there can be multiple trades with the same order_id. It is guaranteed that the sum of the count field for all the trades with the same order_id field shouldn't exceed the place_count on the order.

type UserTradesGetResponse

type UserTradesGetResponse struct {
	Trades *[]UserTrade `json:"trades"`
}

type UserUpdateProfileRequest

type UserUpdateProfileRequest struct {
	// User's phone area code.
	AreaCode  string `json:"area_code"`
	BirthDate string `json:"birth_date,omitempty"`
	City      string `json:"city,omitempty"`
	// User's country 2 digits code
	Country string `json:"country"`
	// User's phone country code. Should be 1 for now because only USA accounts are accepted.
	CountryCode string `json:"country_code"`
	FinishedFre bool   `json:"finished_fre,omitempty"`
	FirstName   string `json:"first_name,omitempty"`
	LastName    string `json:"last_name,omitempty"`
	// User's phone number.
	PhoneNumber string `json:"phone_number"`
	// User's address postal code
	PostalCode string `json:"postal_code"`
	// User's state 2 digits code
	State     string   `json:"state"`
	Street1   string   `json:"street1,omitempty"`
	Street2   string   `json:"street2,omitempty"`
	UseBidAsk bool     `json:"use_bid_ask,omitempty"`
	Watchlist []string `json:"watchlist,omitempty"`
}

type UserWithdrawalAvailableBalanceResponse

type UserWithdrawalAvailableBalanceResponse struct {
	AvailableBalanceCents int64 `json:"available_balance_cents"`
	WithdrawalFeeCents    int64 `json:"withdrawal_fee_cents"`
}

type UserWithdrawalRequest

type UserWithdrawalRequest struct {
	AmountCents int64  `json:"amount_cents"`
	BankId      string `json:"bank_id"`
	FeeCents    int64  `json:"fee_cents"`
}

type UserWithdrawalResponse

type UserWithdrawalResponse struct {
	Withdrawal *Withdrawal `json:"withdrawal,omitempty"`
	// Id for the withdrawal that was created.
	WithdrawalId string `json:"withdrawal_id"`
}

type UsersApiGetUserImmediateFundingOpts

type UsersApiGetUserImmediateFundingOpts struct {
	DepositAmountCents optional.Int64
}

type UsersApiService

type UsersApiService service

func (*UsersApiService) GetUserImmediateFunding

func (a *UsersApiService) GetUserImmediateFunding(ctx context.Context, userId string, localVarOptionals *UsersApiGetUserImmediateFundingOpts) (GetUserImmediateFundingResponse, *http.Response, error)

func (*UsersApiService) GetUserWithdrawalAvailableBalance

func (a *UsersApiService) GetUserWithdrawalAvailableBalance(ctx context.Context, userId string) (UserWithdrawalAvailableBalanceResponse, *http.Response, error)

UsersApiService GetUserWithdrawalAvailableBalance End-point for getting how much money a member is elgible to withdraw

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userId This parameter should be filled with your user_id provided on log_in

@return UserWithdrawalAvailableBalanceResponse

type Watchlist

type Watchlist struct {
	MarketIds []string `json:"market_ids,omitempty"`
}

Watchlist is the list of markets that you have some activity on, this is used mostly by the UI.

type Withdrawal

type Withdrawal struct {
	AmountCents  int64     `json:"amount_cents,omitempty"`
	BankId       string    `json:"bank_id,omitempty"`
	CreatedTs    time.Time `json:"created_ts,omitempty"`
	Id           string    `json:"id,omitempty"`
	ReturnCode   string    `json:"return_code,omitempty"`
	ReturnReason string    `json:"return_reason,omitempty"`
	Status       string    `json:"status,omitempty"`
	UserId       string    `json:"user_id,omitempty"`
}

Represents a withdrawal.

type WithdrawalHistory

type WithdrawalHistory struct {
	Amount         int64     `json:"amount,omitempty"`
	CreatedAt      time.Time `json:"created_at,omitempty"`
	Fee            int64     `json:"fee,omitempty"`
	ReturnedAmount int64     `json:"returned_amount,omitempty"`
	Status         string    `json:"status,omitempty"`
	UpdatedAt      time.Time `json:"updated_at,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL