Type/to search
Built-in Functions
Global
Version
IsVirtual
GetOS
GetPid
GetMeta
Sleep
Unix
UnixNano
_D
GetCommand
GetLastError
SetErrorFilter
_N
_C
_Cross
JSON.parse
JSON.stringify
Encode
MD5
UUID
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Create a UUID.

UUID()

Examples

Generate two UUIDs; each call returns a different value.

javascript
function main() { var uuid1 = UUID() var uuid2 = UUID() Log(uuid1, uuid2) // Output: two different 32-character uppercase hex strings, e.g. // 3F2A8C1D9B7E4A6C8D0E1F2A3B4C5D6E }
python
def main(): uuid1 = UUID() uuid2 = UUID() Log(uuid1, uuid2) # Output: two different 32-character uppercase hex strings, e.g. # 3F2A8C1D9B7E4A6C8D0E1F2A3B4C5D6E
rust
fn main() { let uuid1 = UUID(); let uuid2 = UUID(); Log!(uuid1, uuid2); // Output: two different 32-character uppercase hex strings, e.g. // 3F2A8C1D9B7E4A6C8D0E1F2A3B4C5D6E }

Returns

TypeDescription

string

A UUID string of 32 uppercase hexadecimal characters (without hyphens).

See Also

Remarks

The UUID() function is only supported in live trading.