Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Latest commit

 

History

History
136 lines (102 loc) · 4.73 KB

LinearWalletApi.md

File metadata and controls

136 lines (102 loc) · 4.73 KB

swagger_client.LinearWalletApi

All URIs are relative to https://api.bybit.com

Method HTTP request Description
linear_wallet_get_risk_limit GET /public/linear/risk-limit Get risk limit.
linear_wallet_set_risk_limit POST /private/linear/position/set-risk This will set risk limit

linear_wallet_get_risk_limit

object linear_wallet_get_risk_limit()

Get risk limit.

This will get risk limit.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['sign'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sign'] = 'Bearer'
# Configure API key authorization: timestamp
configuration = swagger_client.Configuration()
configuration.api_key['timestamp'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['timestamp'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LinearWalletApi(swagger_client.ApiClient(configuration))

try:
    # Get risk limit.
    api_response = api_instance.linear_wallet_get_risk_limit()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LinearWalletApi->linear_wallet_get_risk_limit: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

linear_wallet_set_risk_limit

object linear_wallet_set_risk_limit(symbol, risk_id, side=side)

This will set risk limit

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['sign'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sign'] = 'Bearer'
# Configure API key authorization: timestamp
configuration = swagger_client.Configuration()
configuration.api_key['timestamp'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['timestamp'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.LinearWalletApi(swagger_client.ApiClient(configuration))
symbol = 'symbol_example' # str | Contract type.
risk_id = 8.14 # float | Risk ID. Can be found with the Get risk limit list endpoint.
side = 'side_example' # str |  (optional)

try:
    # This will set risk limit
    api_response = api_instance.linear_wallet_set_risk_limit(symbol, risk_id, side=side)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LinearWalletApi->linear_wallet_set_risk_limit: %s\n" % e)

Parameters

Name Type Description Notes
symbol str Contract type.
risk_id float Risk ID. Can be found with the Get risk limit list endpoint.
side str [optional]

Return type

object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]