This transaction is used to update the global variable settings.
Name | Type | Required | Description |
---|
| | | The value is "UpdateGlovalVar " |
| | | |
| | | |
| | | Different operation has different variable |
| | | |
There are 5 parameters, different operations correspond to different parameters:
Modify the collect-fee account.
Name | Type | Required | Description |
---|
| | | |
For example:
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"feeAccount": {
"accountId": 10
}
},
"serialId": 100
}
Modify the insurance fund account
Name | Type | Required | Description |
---|
| | | The account id of insuranceFundAccount |
For Example:
{
"type": "UpdateGlobalVar",
"fromChainId": 1,
"subAccountId": 1,
"parameter": {
"insuranceFundAccount": {
"accountId": 9
}
},
"serialId": 100
}
Modify the margin info in the specified index.
Name | Type | Required | Description |
---|
| | | |
| | | |
| | | the ratio, 100 means 1.0% |
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.
Name | Type | Required | Description |
---|
| | | |
| | | The symbol of the contract |
| | | The initial margin rate of the contract, 100 means 0.1% |
| | | 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
Name | Type | Required | Description |
---|
| | | |
| | | |
| | | the mark price of the trade pair |
| | | the fee funding rate, the actual result needs to be divided by 10^6 |
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