Skip to content

Latest commit

 

History

History
142 lines (123 loc) · 7.38 KB

README.md

File metadata and controls

142 lines (123 loc) · 7.38 KB

Go API client for swagger

REST API for the Bybit Exchange.

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.languages.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://api-testnet.bybit.com

Class Method HTTP request Description
APIkeyApi APIkeyInfo Get /open-api/api-key Get account api-key information.
CommonApi CommonGet Get /v2/public/time Get bybit server time.
ConditionalApi ConditionalCancel Post /open-api/stop-order/cancel Cancel conditional order.
ConditionalApi ConditionalGetOrders Get /open-api/stop-order/list Get my conditional order list.
ConditionalApi ConditionalNew Post /open-api/stop-order/create Place a new conditional order.
ConditionalApi ConditionalReplace Post /open-api/stop-order/replace Replace conditional order. Only incomplete orders can be modified.
ExecutionApi ExecutionGetTrades Get /v2/private/execution/list Get user’s trade records.
FundingApi FundingGetRate Get /open-api/funding/prev-funding Funding settlement occurs every 8 hours at 00:00 UTC, 08:00 UTC and 16:00 UTC. The current interval's fund fee settlement is based on the previous interval's fund rate. For example, at 16:00, the settlement is based on the fund rate generated at 8:00. The fund rate generated at 16:00 will be used at 0:00 on the next day.
FundingApi FundingPredicted Get /open-api/funding/predicted-funding Get predicted funding rate and funding fee.
FundingApi FundingPredictedRate Get /open-api/funding/prev-funding-rate Get predicted funding rate and funding fee.
KlineApi KlineGet Get /v2/public/kline/list Query historical kline.
MarketApi MarketOrderbook Get /v2/public/orderBook/L2 Get the orderbook.
MarketApi MarketSymbolInfo Get /v2/public/tickers Get the latest information for symbol.
OrderApi OrderCancel Post /open-api/order/cancel Get my active order list.
OrderApi OrderGetOrders Get /open-api/order/list Get my active order list.
OrderApi OrderNew Post /open-api/order/create Place active order
OrderApi OrderQuery Get /v2/private/order Get my active order list.
OrderApi OrderReplace Post /open-api/order/replace Replace active order. Only incomplete orders can be modified.
PositionsApi PositionsChangeMargin Post /position/change-position-margin Update margin.
PositionsApi PositionsMyPosition Get /position/list Get my position list.
PositionsApi PositionsSaveLeverage Post /user/leverage/save Change user leverage.
PositionsApi PositionsTradingStop Post /open-api/position/trading-stop Set Trading-Stop Condition.
PositionsApi PositionsUserLeverage Get /user/leverage Get user leverage setting.
SymbolApi SymbolGet Get /v2/public/symbols Query Symbols.
WalletApi WalletGetRecords Get /open-api/wallet/fund/records Get wallet fund records
WalletApi WalletWithdraw Get /open-api/wallet/withdraw/list Get wallet fund records

Documentation For Models

Documentation For Authorization

apiKey

  • 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)

apiSignature

  • 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)

timestamp

  • 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

support@bybit.com