UpdateGlobalVar
This transaction is used to update the global variable settings.
type
String
yes
The value is "UpdateGlovalVar "
seriaId
u64
yes
The serial id
There are 5 parameters, different operations correspond to different parameters:
Modify the collect-fee account.
For example:
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"feeAccount": {
"accountId": 10
}
},
"serialId": 100
}Modify the insurance fund account
For Example:
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"insuranceFundAccount": {
"accountId": 9
}
},
"serialId": 100
}Modify the margin info in the specified index.
For example
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"marginInfo": {
"marginId": 1,
"tokenId": 9,
"ratio": 0
}
},
"serialId": 100
}Modify the info of every perpetual contract pair.
symbol
String
yes
The symbol of the contract
initialMarginRate
u16
yes
The initial margin rate of the contract, 100 means 0.1%
maintenanceMarginRate
u16
yes
The maintenance margin rate, 100 means 0.1%
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"contractInfo": {
"pairId": 2,
"symbol": "BTCUSDC",
"initialMarginRate": 6,
"maintenanceMarginRate": 8
}
},
"serialId": 100
}Update the funding rates to accumulated funding rates of the Global Vars for all position(contract pair) in this period
For example:
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"fundingInfos": {
"infos": [
{
"pairId": 0,
"price": "1000000000000000000",
"fundingRate": 32767
},
{
"pairId": 1,
"price": "1000000000000000",
"fundingRate": 0
}
]
}
},
"serialId": 100
}Last updated
Was this helpful?