Token

After acquiring API Key, you can generate a Token Fields according to the rules, and call the Open API interface with it.

txt
Example: Assuming that the requested URL is "https://scaler.taurusx.com/openapi/performance_data",
then the request header needs to be added
access-key: 018168163a17d44907669d58ee9ad687
token: a6864d4ef31b09cdc1c5d22214cde5db
timestamp: 1697785289
Example: Assuming that the requested URL is "https://scaler.taurusx.com/openapi/performance_data",
then the request header needs to be added
access-key: 018168163a17d44907669d58ee9ad687
token: a6864d4ef31b09cdc1c5d22214cde5db
timestamp: 1697785289

Token Parameter Generation Rules

The Token parameter generation rules are as follows:

FieldTypeDescriptionExample
access-keystringAccess-key and api-key generated by Taurusx"018168163a17d44907669d58ee9ad687"
tokenstringGeneration method:Md5(api-key.md5(timestamp))"a6864d4ef31b09cdc1c5d22214cde5db"
timestampintTimestamp (second)1697785289

Example

Python Example

Python
import time
import hashlib

api_key = "af6d4b1cbdb4fbe2d1ee838fabfe92fe"
timestamp = str(int(time.time()))

token = hashlib.md5((api_key + hashlib.md5(timestamp.encode()).hexdigest()).encode()).hexdigest()

print(token)
import time
import hashlib

api_key = "af6d4b1cbdb4fbe2d1ee838fabfe92fe"
timestamp = str(int(time.time()))

token = hashlib.md5((api_key + hashlib.md5(timestamp.encode()).hexdigest()).encode()).hexdigest()

print(token)

Go Example

Go
package main

import (
	"crypto/md5"
	"encoding/hex"
	"fmt"
	"time"
)

func md5Hash(s string) string {
	hash := md5.Sum([]byte(s))
	return hex.EncodeToString(hash[:])
}

func main() {
	apiKey := "af6d4b1cbdb4fbe2d1ee838fabfe92fe"
	timestamp := fmt.Sprintf("%d", time.Now().Unix())

	token := md5Hash(apiKey + md5Hash(timestamp))

	fmt.Println(token)
}
package main

import (
	"crypto/md5"
	"encoding/hex"
	"fmt"
	"time"
)

func md5Hash(s string) string {
	hash := md5.Sum([]byte(s))
	return hex.EncodeToString(hash[:])
}

func main() {
	apiKey := "af6d4b1cbdb4fbe2d1ee838fabfe92fe"
	timestamp := fmt.Sprintf("%d", time.Now().Unix())

	token := md5Hash(apiKey + md5Hash(timestamp))

	fmt.Println(token)
}

PHP Example

PHP
<?php
    $api_key = 'af6d4b1cbdb4fbe2d1ee838fabfe92fe';
    $timestamp = time();
    $token = md5($api_key.md5($timestamp));
    ?>
<?php
    $api_key = 'af6d4b1cbdb4fbe2d1ee838fabfe92fe';
    $timestamp = time();
    $token = md5($api_key.md5($timestamp));
    ?>