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 |
object linear_wallet_get_risk_limit()
Get risk limit.
This will get risk limit.
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)
This endpoint does not need any parameter.
object
apiKey, apiSignature, timestamp
- 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]
object linear_wallet_set_risk_limit(symbol, risk_id, side=side)
This will set risk limit
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)
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] |
object
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]