get https://api.sui-prod.bluefin.io/dead-man-switch/dms-countdown
Client Library:
The method getCancelOnDisconnectTimer
allows users to get the stored timer for Cancel On Disconnect All Open Orders (dead-man-switch) feature.
Only the whitelisted sub-accounts and the parent can get countdowns on behalf of the parent.
Examples:
import {
Networks,
FireflyClient,
MARKET_SYMBOLS
} from "../index";
async function main() {
const dummyAccountKey =
"a182091b4d5a090b65d604e36f68629a692e3bf2aa864bd3f037854034cdd676";
const client = new FireflyClient(true, Networks.TESTNET_ARBITRUM, dummyAccountKey); //passing isTermAccepted = true for compliance and authorizarion
await client.init()
client.addMarket(MARKET_SYMBOLS.BTC);
const response = await client.getCancelOnDisconnectTimer();
console.log(response.data);
}
main().then().catch(console.warn);
from config import TEST_ACCT_KEY, TEST_NETWORK
from firefly_exchange_client import FireflyClient, Networks
import asyncio
async def main():
client = FireflyClient(True, Networks[TEST_NETWORK], TEST_ACCT_KEY)
await client.init(True)
print("User: ", client.get_public_address())
try:
# sending post request to reset user's count down timer with MARKET_SYMBOL for auto cancellation of order
postResponse = await client.get_cancel_on_disconnect_timer()
print(postResponse)
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())
HTTPs
Alternatively, if you have obtained your API auth token, you may use this to reset CountDown by making an HTTPs call to the POST /dms-countdown by using the tool on the right or locally from any other language supporting HTTPs network calls.