The resource loading... loading...

exchange.SetRate

Set the current exchange rate of the exchange object.

exchange.SetRate(rate)

The rate parameter is used to specify the conversion exchange rate. rate true number

function main(){
    Log(exchange.GetTicker())
    // Set exchange rate conversion
    exchange.SetRate(7)
    Log(exchange.GetTicker())
    // Set to 1, no conversion
    exchange.SetRate(1)
}
def main():
    Log(exchange.GetTicker())
    exchange.SetRate(7)
    Log(exchange.GetTicker())
    exchange.SetRate(1)
void main() {
    Log(exchange.GetTicker());
    exchange.SetRate(7);
    Log(exchange.GetTicker());
    exchange.SetRate(1);
}

If an exchange rate value has been set using the exchange.SetRate() function, such as 7. Then all price information such as tickers, depths, order prices, etc. for the exchange represented by the current exchange exchange object will be converted by multiplying it by the set exchange rate of 7. For example, exchange is an exchange with the US dollar as the denomination currency. After executing exchange.SetRate(7), all prices on the live market will be converted to prices close to CNY denomination by multiplying by 7.

{@fun/Market/exchange.GetRate exchange.GetRate}

exchange.SetPrecision exchange.IO