Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ When initializing the client, users must accept [terms and conditions](https://b
{
"apiGateway": "https://dapi.api.sui-prod.bluefin.io",
"socketURL": "wss://dapi.api.sui-prod.bluefin.io",
"dmsURL": "https://dapi.api.sui-prod.bluefin.io",
"dmsURL": "https://api.sui-prod.bluefin.io/dead-man-switch",
"webSocketURL": "wss://notifications.api.sui-prod.bluefin.io",
"onboardingUrl": "https://trade.bluefin.io"
"onboardingUrl": "https://trade-sui.bluefin.exchange"
}
```

Expand Down
50 changes: 50 additions & 0 deletions examples/18.dms_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import json

import sys, os

sys.path.append(os.getcwd() + "/src/")
from config import TEST_ACCT_KEY, TEST_SUB_ACCT_KEY, TEST_NETWORK
from bluefin_v2_client import (
BluefinClient,
MARKET_SYMBOLS,
ORDER_SIDE,
ORDER_TYPE,
Networks,
OrderSignatureRequest,
)
import asyncio

from bluefin_client_sui.interfaces import PostTimerAttributes


async def main():
client = BluefinClient(True, Networks[TEST_NETWORK], TEST_ACCT_KEY)
await client.init(True)

print("User: ", client.get_public_address())
countDownsObject: PostTimerAttributes = dict()
countDowns = list()
countDowns.append({"symbol": MARKET_SYMBOLS.BTC.value, "countDown": 3 * 1000})

countDowns.append({"symbol": MARKET_SYMBOLS.ETH.value, "countDown": 3 * 1000})

countDownsObject["countDowns"] = countDowns
try:
# sending post request to reset user's count down timer with MARKET_SYMBOL for auto cancellation of order
postResponse = await client.reset_cancel_on_disconnect_timer(countDownsObject)
print(postResponse)
# get request to get user's count down timer for MARKET_SYMBOL
getResponse = await client.get_cancel_on_disconnect_timer(
{"symbol": MARKET_SYMBOLS.ETH}
)
print(getResponse)

except Exception as e:
print(e)

await client.close_connections()


if __name__ == "__main__":
event_loop = asyncio.get_event_loop()
event_loop.run_until_complete(main())
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bluefin_v2_client"
version = "2.0.1"
version = "2.0.2"
description = "Library to interact with Bluefin exchange protocol including its off-chain api-gateway and on-chain contracts"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
4 changes: 2 additions & 2 deletions src/bluefin_v2_client/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"url": "https://fullnode.testnet.sui.io:443",
"apiGateway": "https://dapi.api.sui-staging.bluefin.io",
"socketURL": "wss://dapi.api.sui-staging.bluefin.io",
"dmsURL": "https://dapi.api.sui-staging.bluefin.io",
"dmsURL": "https://api.sui-staging.bluefin.io/dead-man-switch",
"webSocketURL": "wss://notifications.api.sui-staging.bluefin.io",
"onboardingUrl": "https://testnet.bluefin.io",
},
"SUI_PROD": {
"url": "https://fullnode.testnet.sui.io:443",
"apiGateway": "https://dapi.api.sui-prod.bluefin.io",
"socketURL": "wss://dapi.api.sui-prod.bluefin.io",
"dmsURL": "https://dapi.api.sui-prod.bluefin.io",
"dmsURL": "https://api.sui-prod.bluefin.io/dead-man-switch",
"webSocketURL": "wss://notifications.api.sui-prod.bluefin.io",
"onboardingUrl": "https://trade-sui.bluefin.exchange",
},
Expand Down