The script language is composed of several rules composed of a currency pair and a mathematic expression.
The example below will use gdax for both LTC_USD and BTC_USD pairs.
LTC_USD = gdax(LTC_USD);
BTC_USD = gdax(BTC_USD);
However, explicitely setting specific pairs like this can be a bit difficult. Instead, you can define a rule X_X which will match any currency pair. The following example will use gdax for getting the rate of any currency pair.
X_X = gdax(X_X);
However, gdax does not support the BTC_CAD pair. For this reason you can add a rule mapping all X_CAD to quadrigacx, a Canadian exchange.
X_CAD = quadrigacx(X_CAD);
X_X = gdax(X_X);
A given currency pair match the most specific rule. If two rules are matching and are as specific, the first rule will be chosen.
But now, what if you want to support DOGE? The problem with DOGE is that most exchange do not have any pair for it. But bittrex has a DOGE_BTC pair.
Luckily, the rule engine allow you to reference rules:
DOGE_X = bittrex(DOGE_BTC) * BTC_X
X_CAD = quadrigacx(X_CAD);
X_X = gdax(X_X);
With DOGE_USD will be expanded to bittrex(DOGE_BTC) * gdax(BTC_USD). And DOGE_CAD will be expanded to bittrex(DOGE_BTC) * quadrigacx(BTC_CAD)