Skip to main content

Greek

Subscribe to the greeks stream to see changes to your greeks data in real-time. option only.

Topic: greeks

Response Parameters

ParameterTypeComments
idstringMessage ID
topicstringTopic name
creationTimenumberData created timestamp (ms)
dataarrayObject
> baseCoinstringBase coin
> totalDeltastringDelta value
> totalGammastringGamma value
> totalVegastringVega value
> totalThetastringTheta value

Subscribe Example

{
"op": "subscribe",
"args": [
"greeks"
]
}
from pybit.unified_trading import WebSocket
from time import sleep
ws = WebSocket(
testnet=True,
channel_type="private",
api_key="XXXXX",
api_secret="XXXXX",
)
def handle_message(message):
print(message)
ws.greek_stream(callback=handle_message)
while True:
sleep(1)

Stream Example

{
"id": "592324fa945a30-2603-49a5-b865-21668c29f2a6",
"topic": "greeks",
"creationTime": 1672364262482,
"data": [
{
"baseCoin": "ETH",
"totalDelta": "0.06999986",
"totalGamma": "-0.00000001",
"totalVega": "-0.00000024",
"totalTheta": "0.00001314"
}
]
}