Sumber dimuat naik... memuat...

Arahan FMZ API

Penulis:Sifar, Dicipta: 2020-04-20 10:19:00, Dikemas kini: 2023-04-12 14:44:56

// true    

}


[http://underscorejs.org/](http://underscorejs.org/)
```js
function main() {
    var sum = _.reduce([1, 2, 3], function(memo, num){return memo + num}, 0)
    Log(sum)
}
  • C++perpustakaanhttps://nlohmann.github.io/json/
    void main() {
        json table = R"({"type": "table", "title": "Position Information", "cols": ["Column1", "Column2"], "rows": [["abc", "def"], ["ABC", "support color #ff0000"]]})"_json;
        LogStatus("`" + table.dump() + "`");
        LogStatus("Fist line message\n`" + table.dump() + "`\nThird line message");
        json arr = R"([])"_json;
        arr.push_back(table);
        arr.push_back(table);
        LogStatus("`" + arr.dump() + "`");
        
        table = R"({
            "type" : "table", 
            "title" : "Position Operation", 
            "cols" : ["Column1", "Column2", "Action"], 
            "rows" : [
                ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "close position"}]
            ] 
        })"_json;
        LogStatus("`" + table.dump() + "`", "\n`" + R"({"type": "button", "cmd": "coverAll", "name": "close position"})"_json.dump() + "`");
    }
    

Penunjuk Fungsi di Perpustakaan Talib

Antara parameter fungsi berikut,Records[Close]mewakili harga penutupan dalam data k-line yang masuk,Array()mewakili array, danArray(outInteger)mewakili mengembalikan pelbagai data bilangan bulat.

Contoh kod untuk panggilanCCIpenunjuk:

function main() {
    var records = exchange.GetRecords()
    var cci = talib.CCI(records, 14)
    Log(cci)
}
import talib
def main():
    records = exchange.GetRecords()
    # the parameter "14" can be default 
    cci = talib.CCI(records.High, records.Low, records.Close, 14)   
    Log(cci)
void main() {
    auto records = exchange.GetRecords();
    auto cci = talib.CCI(records, 14);
    Log(cci);
}
  • Pattern Recognition:

    Penunjuk Penerangan
    CDL2CROWS Dua Burung gagak
    CDL2CROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3BLACKCROWS Tiga gagak hitam
    CDL3BLACKCROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3dalam Tiga dalam atas/bawah
    CDL3INSIDE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3LINESTRIKE Serangan Tiga Baris
    CDL3LINESTRIKE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3KELAS Tiga di luar atas/bawah
    CDL3OUTSIDE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3STARSINSouth Tiga Bintang di Selatan
    CDL3STARSINSOUTH ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3Tentara Putih Tiga Tentera Putih yang Melangkah
    CDL3WHITESOLDIERS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLABANDONEDBABY Bayi yang Ditinggalkan
    CDLABANDONEDBABY ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLADVANCEBLOCK Blokkan Advance
    CDLADVANCEBLOCK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLBELTHOLD Pegang tali pinggang
    CDLBELTHOLD ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLBREAKAWAY Perpisahan
    CDLBREAKAWAY ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLCLOSING MARUBOZU Menutup Marubozu
    CDLCLOSINGMARUBOZU ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLCONCEALBABYSWALL Menyembunyikan Bayi Swallow
    CDLCONCEALBABYSWALL ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLKONTRATAK Serangan balas
    CDLCOUNTERATTACK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLDARKCLOUDCOVER Penutup Awan Gelap
    CDLDARKCLOUDCOVER ((Records[Open,High,Low,Close],Penetration = 0.5) = Array ((outInteger)
    CDLDOJI Doji
    CDLDOJI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLDOJISTAR Bintang Doji
    CDLDOJISTAR ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLDRAGONFLYDOJI Doji Kupu-kupu
    CDLDRAGONFLYDOJI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    PEMBALANGAN Bentuk yang Menelan
    CDLENGULFING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLEVENINGDOJISTAR Bintang Malam Doji
    CDLEVENINGDOJISTAR ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLEVENINGSTAR Bintang Malam
    CDLEVENINGSTAR ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLGAPSIDEESIDEWITH Garis putih bersebelahan atas/bawah
    CDLGAPSIDESIDEWITE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLGRAVESTONEDOJI Doji batu kubur
    CDLGRAVESTONEDOJI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHAMMER Palu
    CDLHAMMER ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHANGINGMAN Lelaki yang digantung
    CDLHANGINGMAN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHARAMI Corak Harami
    CDLHARAMI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHARAMICROSS Corak Salib Harami
    CDLHARAMICROSS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHIGHWAVE Lilin Gelombang Tinggi
    CDLHIGHWAVE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHIKKAKE Pola Hikkake
    CDLHIKKAKE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHIKKAKEMOD Corak Hikkake yang diubahsuai
    CDLHIKKAKEMOD ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHOMINGPIGEON Burung merpati
    CDLHOMINGPIGEON ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLIDENTICAL3CROWS Tiga gagak yang sama
    CDLIDENTICAL3CROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLINNECK Corak Dalam leher
    CDLINNECK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLINVERTEDHAMMER Palu terbalik
    CDLINVERTEDHAMMER ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLKICK Menendang
    CDLKICKING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLKICKINGBYLENGTH Menendang - lembu / beruang ditentukan oleh marubozu yang lebih panjang
    CDLKICKINGBYLENGTH ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLLADDERBOTTOM Bahagian bawah tangga
    CDLLADDERBOTTOM ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLLONGLEGGEDDOJI Dojz Berkaki Panjang
    CDLLONGLEGGEDDOJI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLLONGLINE Lilin panjang lilin
    CDLLONGLINE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLMARUBOZU Marubozu
    CDLMARUBOZU ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLMATCHINGLOW Mencocokkan Rendah
    CDLMATCHINGLOW ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLMATHOLD Pegang Mat
    CDLMATHOLD ((Records[Open,High,Low,Close],Penetration = 0.5) = Array ((outInteger)
    CDMORNINGDOJISTAR Bintang Doji Pagi
    CDLMORNINGDOJISTAR ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLMORNINGSTAR Bintang Pagi
    CDLMORNINGSTAR ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLONNECK Corak di leher
    CDLONNECK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    PEMBANGUNAN Bentuk Penembusan
    CDLPIERCING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLRICKSHAWMAN Lelaki Rickshaw
    CDLRICKSHAWMAN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLRISEFALL3 METHODS Tiga Kaedah Naik/Jatuh
    CDLRISEFALL3METHODS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLPembagianLINES Garis Perpisahan
    CDLSEPARATINGLINES ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSHOOTINGSTAR Bintang Menembak
    CDLSHOOTINGSTAR ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSORTLINE Lilin pendek lilin
    CDLSHORTLINE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL SPINNINGTOP Spinning Top
    CDLSPINNINGTOP ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSTALLEDPATTERN Corak yang terhenti
    CDLSTALLEDPATTERN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSTICKSANDWICH Sandwic Stick
    CDLSTICKSANDWICH ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLTAKURI Takuri (Dragonfly Doji dengan bayangan bawah yang sangat panjang)
    CDLTAKURI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLTASUKIGAP Kesenjangan Tasuki
    CDLTASUKIGAP ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLTHRUSTING Pola Mendorong
    CDLTHRUSTING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLTRISTAR Corak Tristar
    CDLTRISTAR ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLUNIQUE3RIVER Sungai Unik 3
    CDLUNIQUE3RIVER ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLUPSIDEGAP2CROWS Jurang atas Dua gagak
    CDLUPSIDEGAP2CROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLXSIDEGAP3METHODS Jurang Up/Downside Tiga Kaedah
    CDLXSIDEGAP3METHODS ((Records[Open,High,Low,Close]) = Array ((outInteger)
  • Volume Indicators:

    Penunjuk Penerangan
    AD Chaikin A/D Line
    AD ((Records[High,Low,Close,Volume]) = Array ((outReal)
    ADOSC Chaikin A/D Oscillator
    ADOSC ((Records[High,Low,Close,Volume],Fast Period = 3,Slow Period = 10) = Array ((outReal)
    OBV Mengenai Volume Saldo
    OBV ((Records[Close],Records[Volume]) = Array ((outReal)
  • Math Transform:

    Penunjuk Penerangan
    ACOS ACos Trigonometri Vektor
    ACOS ((Records[Close]) = Array ((outReal)
    ASIN Vektor Trigonometri ASin
    ASIN ((Records[Close]) = Array ((outReal)
    ATAN Vektor Trigonometri ATan
    ATAN ((Records[Close]) = Array ((outReal)
    CEIL Sekatan Vektor
    CEIL ((Records[Close]) = Array ((outReal)
    Kos Kos Trigonometri Vektor
    COS ((Records[Close]) = Array ((outReal)
    COSH Cosh Trigonometri Vektor
    COSH ((Records[Close]) = Array ((outReal)
    Hingga tamat Vektor Aritmatika Exp
    EXP ((Records[Close]) = Array ((outReal)
    Lantai Lantai Vektor
    FLOOR ((Records[Close]) = Array ((outReal)
    LN Vektor Log semulajadi
    LN ((Records[Close]) = Array ((outReal)
    LOG10 Vektor Log10
    LOG10 ((Records[Close]) = Array ((outReal)
    SIN Sin Trigonometri Vektor
    SIN ((Records[Close]) = Array ((outReal)
    SINH Vektor Trigonometri Sinh
    SINH ((Records[Close]) = Array ((outReal)
    SQRT Akar Kuadrat Vektor
    SQRT ((Records[Close]) = Array ((outReal)
    TAN Trigonometri vektor Tan
    TAN ((Records[Close]) = Array ((outReal)
    Tan Vektor Trigonometri Tanh
    TANH ((Records[Close]) = Array ((outReal)
  • Math Operators:

    Penunjuk Penerangan
    Max Nilai tertinggi dalam tempoh tertentu
    MAX ((Records[Close],Time Period = 30) = Array ((outReal)
    MAXINDEX Indeks nilai tertinggi dalam tempoh tertentu
    MAXINDEX ((Records[Close],Time Period = 30) = Array ((outInteger)
    MIN Nilai terendah dalam tempoh tertentu
    MIN ((Records[Close],Time Period = 30) = Array ((outReal)
    MININDEX Indeks nilai terendah dalam tempoh tertentu
    MININDEX ((Records[Close],Time Period = 30) = Array ((outInteger)
    MINMAX Nilai terendah dan tertinggi dalam tempoh tertentu
    MINMAX ((Records[Close],Time Period = 30) = [Array ((outMin),Array ((outMax) ]
    MINMAXINDEX Indeks nilai terendah dan tertinggi dalam tempoh tertentu
    MINMAXINDEX ((Records[Close],Time Period = 30) = [Array ((outMinIdx),Array ((outMaxIdx) ]
    Jumlah Ringkasan
    SUM ((Records[Close],Time Period = 30) = Array ((outReal)
  • Cycle Indicators:

    Penunjuk Penerangan
    HT_DCPERIOD Transformasi Hilbert - Tempoh kitaran dominan
    HT_DCPERIOD ((Records[Close]) = Array ((outReal)
    HT_DCPHASE Transformasi Hilbert - Fasa kitaran dominan
    HT_DCPHASE ((Records[Close]) = Array ((outReal)
    HT_PHASOR Transformasi Hilbert - Komponen Phasor
    HT_PHASOR ((Records[Close]) = [Array ((outInPhase),Array ((outQuadrature) ]
    HT_SINE Transformasi Hilbert - SineWave
    HT_SINE ((Records[Close]) = [Array ((outSine),Array ((outLeadSine) ]
    HT_TRENDMODE Transform Hilbert - Trend vs Mode Kitaran
    HT_TRENDMODE ((Records[Close]) = Array ((outInteger)
  • Volatility Indicators:

    Penunjuk Penerangan
    ATR Julat sebenar purata
    ATR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    NATR Julat sebenar purata yang normal
    NATR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    TANJANG Julat sebenar
    TRANGE ((Records[High,Low,Close]) = Array ((outReal)
  • Overlap Studies:

    Penunjuk Penerangan
    BBANDS Bollinger Bands
    BBANDS ((Records[Close],Time Period = 5,Deviations up = 2,Deviations down = 2,MA Type = 0) = [Array ((outRealUpperBand),Array ((outRealMiddleBand),Array ((outRealLowerBand) ]
    DEMA Purata Bergerak Eksponensial Ganda
    DEMA ((Records[Close],Time Period = 30) = Array ((outReal)
    EMA Purata Bergerak Eksponensial
    EMA ((Records[Close],Time Period = 30) = Array ((outReal)
    HT_TRENDLINE Transformasi Hilbert - Garis Trend Seketika
    HT_TRENDLINE ((Records[Close]) = Array ((outReal)
    KAMA Kaufman Adaptive Moving Average
    KAMA ((Records[Close],Time Period = 30) = Array ((outReal)
    MA Purata Bergerak
    MA ((Records[Close],Time Period = 30, MA Type = 0) = Array ((outReal)
    Ibu MESA Purata Bergerak Sesuai
    MAMA ((Records[Close],Fast Limit = 0.5,Slow Limit = 0.05) = [Array ((outMAMA),Array ((outFAMA) ]
    SEDERAH Titik pertengahan sepanjang tempoh
    MIDPOINT ((Records[Close],Time Period = 14) = Array ((outReal)
    Harga purata Harga titik pertengahan sepanjang tempoh
    MIDPRICE ((Records[High,Low],Time Period = 14) = Array ((outReal)
    SAR SAR Parabolik
    SAR ((Records[High,Low],Factor percepatan = 0.02,AF Maksimum = 0.2) = Array ((outReal)
    SAREXT SAR Parabolik - Terpanjang
    SAREXT ((Records[High,Low],Start Value = 0,Offset on Reverse = 0,AF Init Long = 0.02,AF Long = 0.02,AF Max Long = 0.2,AF Init Short = 0.02,AF Short = 0.02,AF Max Short = 0.2) = Array ((outReal)
    SMA purata bergerak mudah
    SMA ((Records[Close],Time Period = 30) = Array ((outReal)
    T3 Purata Bergerak Eksponensial Ganda (T3)
    T3 ((Records[Close],Time Period = 5,Volume Factor = 0.7) = Array ((outReal)
    TEMA Purata Bergerak Eksponensial Ganda
    TEMA ((Records[Close],Time Period = 30) = Array ((outReal)
    TRIMA Purata Bergerak Segitiga
    TRIMA ((Records[Close],Time Period = 30) = Array ((outReal)
    WMA Purata Bergerak Bertimbang
    WMA ((Records[Close],Time Period = 30) = Array ((outReal)
  • Statistic Functions:

    Penunjuk Penerangan
    LINEARREG Regresi Linear
    LINEARREG ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_ANGLE Sudut Regresi Linear
    LINEARREG_ANGLE ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_INTERCEPT Pemangkasan Regresi Linear
    LINEARREG_INTERCEPT ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_SLOPE Kemunduran Linier Slope
    LINEARREG_SLOPE ((Records[Close],Time Period = 14) = Array ((outReal)
    STDDEV Penyimpangan standard
    STDDEV ((Records[Close],Time Period = 5, Deviations = 1) = Array ((outReal)
    TSF Ramalan Siri Masa
    TSF ((Records[Close],Time Period = 14) = Array ((outReal)
    VAR Varians
    VAR ((Records[Close],Time Period = 5,Deviations = 1) = Array ((outReal)
  • Momentum Indicators:

    Penunjuk Penerangan
    ADX Indeks Pergerakan Arah Purata
    ADX ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    ADXR Penarafan Indeks Pergerakan Arah Purata
    ADXR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    APO Osilator harga mutlak
    APO ((Records[Close],Fast Period = 12,Slow Period = 26,MA Jenis = 0) = Array ((outReal)
    AROON Aroon
    AROON ((Records[High,Low],Time Period = 14) = [Array ((outAroonDown),Array ((outAroonUp) ]
    AROONOSC Aroon Oscillator
    AROONOSC ((Records[High,Low],Time Period = 14) = Array ((outReal)
    BOP Keseimbangan Kuasa
    BOP ((Records[Open,High,Low,Close]) = Array ((outReal)
    CCI Indeks Saluran Komoditi
    CCI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    CMO Chande Momentum Oscillator
    CMO ((Records[Close],Time Period = 14) = Array ((outReal)
    DX Indeks Pergerakan Arah
    DX ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    MACD Rata-rata bergerak konvergensi/divergensi
    MACD ((Records[Close],Fast Period = 12,Slow Period = 26,Signal Period = 9) = [Array ((outMACD),Array ((outMACDSignal),Array ((outMACDHist) ]
    MACDEXT MACD dengan jenis MA yang boleh dikawal
    MACDEXT ((Records[Close],Fast Period = 12,Fast MA = 0,Slow Period = 26,Slow MA = 0,Signal Period = 9,Signal MA = 0) = [Array ((outMACD),Array ((outMACDSignal),Array ((outMACDHist) ]
    MACDFIX Pemasangan Convergence/Divergence Purata Bergerak 12/26
    MACDFIX ((Records[Close],Signal Period = 9) = [Array ((outMACD),Array ((outMACDSignal),Array ((outMACDHist) ]
    PFI Indeks Aliran Wang
    MFI ((Records[High,Low,Close,Volume],Time Period = 14) = Array ((outReal)
    MINUS_DI Minus Petunjuk Arah
    MINUS_DI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    MINUS_DM Minus Pergerakan Arah
    MINUS_DM ((Records[High,Low],Time Period = 14) = Array ((outReal)
    Ibu Momentum
    MOM ((Records[Close],Time Period = 10) = Array ((outReal)
    PLUS_DI Tambah Petunjuk Arah
    PLUS_DI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    PLUS_DM Tambah Pergerakan Arah
    PLUS_DM ((Records[High,Low],Time Period = 14) = Array ((outReal)
    PPO Peratusan Osilator Harga
    PPO ((Records[Close],Periode pantas = 12,Periode perlahan = 26,MA Jenis = 0) = Array ((outReal)
    ROC Kadar perubahan: ((harga/prevPrice) -1) * 100
    ROC ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCP Kadar perubahan Peratusan: (harga-prevPrice) /prevPrice
    ROCP ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCR Nisbah kadar perubahan: (harga/prevPrice)
    ROCR ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCR100 Kadar perubahan nisbah 100 skala: (harga/prevPrice) * 100
    ROCR100 ((Records[Close],Time Period = 10) = Array ((outReal)
    RSI Indeks Kekuatan Relatif
    RSI ((Records[Close],Time Period = 14) = Array ((outReal)
    STOCH Stochastic
    STOCH ((Records[High,Low,Close],Fast-K Period = 5,Slow-K Period = 3,Slow-K MA = 0,Slow-D Period = 3,Slow-D MA = 0) = [Array(outSlowK),Array(outSlowD]
    STOCHF Cepat Stochastic
    STOCHF ((Records[High,Low,Close],Fast-K Period = 5,Fast-D Period = 3,Fast-D MA = 0) = [Array(outFastK),Array(outFastD]
    STOCHRSI Indeks Kekuatan Relatif Stochastic
    STOCHRSI ((Records[Close],Time Period = 14,Fast-K Period = 5,Fast-D Period = 3,Fast-D MA = 0) = [Array(outFastK),Array(outFastD]
    TRIX Rate-of-Change (ROC) 1 hari daripada EMA Ganda Lempar
    TRIX ((Records[Close],Time Period = 30) = Array ((outReal)
    ULTOSC Oscillator Utama
    ULTOSC ((Records[High,Low,Close],Periode Pertama = 7,Periode Kedua = 14,Periode Ketiga = 28) = Array ((outReal)
    WILLR Williams %R
    WILLR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
  • Price Transform:

    Penunjuk Penerangan
    AVGPRICE Harga Purata
    AVGPRICE ((Records[Open,High,Low,Close]) = Array ((outReal)
    Harga MED Harga purata
    MEDPRICE ((Records[High,Low]) = Array ((outReal)
    TYPEPRICE Harga Tipikal
    TYPPRICE ((Records[High,Low,Close]) = Array ((outReal)
    WCLPRICE Harga Penutupan Bertingkat
    WCLPRICE ((Records[High,Low,Close]) = Array ((outReal)

Data asas

Platform FMZ Quant Trading menyokong backtesting dan pertanyaan pelbagai data asas dalam bot. Data asas disediakan dalam masa nyata oleh pusat data platform FMZ Quant Trading, dan pusat data akan terus mengumpul dan meringkaskan pelbagai data asas.

Panggilan Data

Penggunaanexchange.GetData(Source)fungsi untuk mendapatkan data asas. Data asas cryptocurrency tidak dikumpulkan sementara.

Format Data

Data asas cryptocurrency tidak dikumpulkan sementara.

Peluasan API Platform FMZ

Platform FMZ Quant Trading menyokong panggilan programatik pelbagai fungsi Platform, dan ia telah membuka API yang diperluaskan.

Ia menyokong sambungan pengurusan pihak berkuasa API, seperti yang ditunjukkan dalam gambar:

img

Ia membolehkan yang baru ditambahAPI KEYAnda boleh masuk.*dalam kotak input kebenaran API untuk membuka semua kebenaran antara muka. tentukan kebenaran antara muka tertentu, dan masukkan nama fungsi API yang disalurkan yang sepadan, dipisahkan dengan koma, sepertiGetRobotDetail, DeleteRobot, iaitu, berikan iniAPI KEYizin untukmendapatkan antara muka bot maklumat terperincidanhapus antara muka bot.

Buat ApiKey

img

Kod Pengembalian API

Penerangan Kod
Pelaksanaan yang berjaya 0
Kunci API yang salah 1
Tanda tangan yang salah 2
Kesalahan bukan 3
Kaedah yang salah 4
Parameter yang salah 5
Kesalahan dalaman yang tidak diketahui 6

Status bot

(Permulaan biasa)

Status Kod
Tidak aktif 0
Dalam operasi 1
Berhenti 2
Ditandatangani keluar 3
Hentikan 4
Strategi ini mempunyai kesilapan. 5

(tidak normal)

Status Kod
Strategi telah tamat tempoh, dan sila hubungi penulis untuk membelinya lagi -1
Tiada doker dijumpai -2
Kesalahan penyusunan strategi -3
Bot sudah berjalan -4
Saldo yang tidak mencukupi -5
Jumlah strategi serentak melebihi had -6

Cara Pengesahan

Pengesahan Token

Penggunaanmd5kaedah penyulitan untuk disahkan.

Python, contoh panggilan bahasa Golang:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import time
import json
import ssl
ssl._create_default_https_context = ssl._create_unverified_context

try:
    import md5
    import urllib2
    from urllib import urlencode
except:
    import hashlib as md5
    import urllib.request as urllib2
    from urllib.parse import urlencode

accessKey = 'f27bfcXXXXXXXX013c62e98XXXXX817a'
secretKey = 'ffeXXXXXXXX085ff7269XXXXXXXX6f82'

def api(method, *args):
    d = {
        'version': '1.0',
        'access_key': accessKey,
        'method': method,
        'args': json.dumps(list(args)),
        'nonce': int(time.time() * 1000),
        }

    d['sign'] = md5.md5(('%s|%s|%s|%d|%s' % (d['version'], d['method'], d['args'], d['nonce'], secretKey)).encode('utf-8')).hexdigest()
    # Note: for the timeout problem of "urllib2.urlopen" function, you can set the timeout time; for example, urllib2.urlopen ('https://www.fmz.com/api/v1', urlencode(d).encode('utf-8'), timeout = 10), that is, set timeout for 10 seconds
    return json.loads(urllib2.urlopen('https://www.fmz.com/api/v1', urlencode(d).encode('utf-8')).read().decode('utf-8'))

# Return the docker list
print(api('GetNodeList'))
# Return the exchange list
print(api('GetPlatformList'))
# GetRobotList (offset, length, robotStatus, label); passing "-1" means obtaining all
print(api('GetRobotList', 0, 5, -1, 'member2'))
# CommandRobot(robotId, cmd) sends commands to the bot
print(api('CommandRobot', 123, 'ok'))
# StopRobot(robotId) returns the bot status code
print(api('StopRobot', 123))  
# RestartRobot(robotId) returns the bot status code
print(api('RestartRobot', 123))
# GetRobotDetail(robotId) returns detailed bot information
print(api('GetRobotDetail', 123))
package main

import (
    "fmt"
    "time"
    "encoding/json"
    "crypto/md5"
    "encoding/hex"
    "net/http"
    "io/ioutil"
    "strconv"
    "net/url"
)

// Fill in your own FMZ platform api key
var apiKey string = ""                                  
// Fill in your own FMZ platform secret key
var secretKey string = ""                               
var baseApi string = "https://www.fmz.com/api/v1"

func api(method string, args ... interface{}) (ret interface{}) {
    // Process args
    jsonStr, err := json.Marshal(args)
    if err != nil {
        panic(err)
    }

    params := map[string]string{
        "version" : "1.0", 
        "access_key" : apiKey,
        "method" : method,
        "args" : string(jsonStr),
        "nonce" : strconv.FormatInt(time.Now().UnixNano() / 1e6, 10),
    }    

    data := fmt.Sprintf("%s|%s|%s|%v|%s", params["version"], params["method"], params["args"], params["nonce"], secretKey)
    h := md5.New()
    h.Write([]byte(data))
    sign := h.Sum(nil)

    params["sign"] = hex.EncodeToString(sign)

    // http request 
    client := &http.Client{}

    // request 
    urlValue := url.Values{}
    for k, v := range params {
        urlValue.Add(k, v)
    }
    urlStr := urlValue.Encode()
    request, err := http.NewRequest("GET", baseApi + "?" + urlStr, nil)
    if err != nil {
        panic(err)
    }    

    resp, err := client.Do(request)
    if err != nil {
        panic(err)
    }

    defer resp.Body.Close()

    b, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    ret = string(b)
    return 
}

func main() {
    settings := map[string]interface{}{
        "name": "hedge test",
        "strategy": 104150,                      
        // K-line period parameter "60" means 60 seconds
        "period": 60,                           
        "node" : 73938,                         
        "appid": "member2",                
        "exchanges": []interface{}{
            map[string]interface{}{
                "eid": "Exchange", 
                "label" : "test_bjex", 
                "pair": "BTC_USDT", 
                "meta" : map[string]interface{}{
                    // Fill in the access key
                    "AccessKey": "",                                
                    // Fill in the secret key
                    "SecretKey": "",                                
                    "Front" : "http://127.0.0.1:6666/exchange",
                },
            },
        },
    }

    method := "RestartRobot"
    fmt.Println("Call interface:", method)
    ret := api(method, 124577, settings)
    fmt.Println("main ret:", ret)
}

Pengesahan Langsung

Ia menyokong pengesahantoken(mengalir)secret_keySebagai contoh, URL yang secara langsung memberikan arahan interaktif kepada bot, yang boleh digunakan untukTradingViewatauWebHookpanggilan balik dalam kes lain. UntukCommandRobot(RobotId, Cmd)fungsi, parameternoncetidak memerlukan pengesahan, dan kekerapan akses dan masa lawatan antara muka tidak terhad.

https://www.fmz.com/api/v1?access_key=xxx&secret_key=yyyy&method=CommandRobot&args=[186515,"ok12345"]

Di bawah keadaan bahawa pengesahan langsung disokong, hanyaCommandRobotantara muka disokong untuk mendapatkanBodydata dalam permintaan. Sebagai contoh, tetapan dalamWebHook URLdaripadaTradingView:

https://www.fmz.com/api/v1?access_key=fd3be82e9e6e6ed4439f2793a5e9ca&secret_key=520b9f10f3768e6ad1af59ff25184&method=CommandRobot&args=[130350,+""]

Berhati-hati untuk menetapkan mengikut format berikut:args=[130350,+""], di mana130350Adakah botIDdari platform FMZ Quant Trading.

Tetapan dalam kotak mesej (data Body yang diminta untuk dihantar):

  • Format JSON:

    {"close": {{close}}, "name": "aaa"}
    

    Bot denganIDdaripada186515boleh menerima arahan interaktif:{"close": 39773.75, "name": "aaa"}.

  • Format teks:

    BTCUSDTPERP Crossing 39700.00 close: {{close}}
    

    Bot denganIDdaripada186515boleh menerima arahan interaktif:BTCUSDTPERP Crossing 39700.00 close: 39739.4.

ContohPython & GolangPanggilan bahasa:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import json
import ssl
ssl._create_default_https_context = ssl._create_unverified_context

try:
    import urllib2
except:
    import urllib.request as urllib2

accessKey = 'your accessKey'
secretKey = 'your secretKey'

def api(method, *args):
    return json.loads(urllib2.urlopen(('https://www.fmz.com/api/v1?access_key=%s&secret_key=%s&method=%s&args=%s' % (accessKey, secretKey, method, json.dumps(list(args)))).replace(' ', '')).read().decode('utf-8'))

# If APIKEY does not have the interface permission, the call to print(api('RestartRobot', 130350)) will fail, and the returned data is: {'code': 4, 'data': None}
# print(api('RestartRobot', 130350))

# Print bot details with ID 130350
print(api('GetRobotDetail', 130350))  
package main

import (
    "fmt"
    "encoding/json"
    "net/http"
    "io/ioutil"
    "net/url"
)

// Fill in your own FMZ platform api key
var apiKey string = "your access_key"                                  
// Fill in your own FMZ platform secret key
var secretKey string = "your secret_key"                               
var baseApi string = "https://www.fmz.com/api/v1"

func api(method string, args ... interface{}) (ret interface{}) {
    jsonStr, err := json.Marshal(args)
    if err != nil {
        panic(err)
    }
    
    params := map[string]string{
        "access_key" : apiKey,
        "secret_key" : secretKey,
        "method" : method,
        "args" : string(jsonStr),
    }    

    // http request 
    client := &http.Client{}

    // request 
    urlValue := url.Values{}
    for k, v := range params {
        urlValue.Add(k, v)
    }
    urlStr := urlValue.Encode()
    request, err := http.NewRequest("GET", baseApi + "?" + urlStr, nil)
    if err != nil {
        panic(err)
    }    

    resp, err := client.Do(request)
    if err != nil {
        panic(err)
    }

    defer resp.Body.Close()

    b, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        panic(err)
    }

    ret = string(b)
    return 
}

func main() {
    method := "GetRobotDetail"
    fmt.Println("Call interface:", method)
    ret := api(method, 130350)
    fmt.Println("main ret:", ret)
}

Gunakan API lanjutan di FMZ Quant untuk merealisasikan perdagangan isyarat amaran

Penjelasan API Terpanjang

  • API lanjutan platform FMZ Quant Trading

    https://www.fmz.com/api/v1?

    Simbol di atas?diikuti dengan parameter permintaan.

    Parameter permintaan yang diterangkan dalamPythonBahasa:

    {
        'version'   : '1.0',
        # Access key, applied on the account management page
        'access_key': '8a1f6c3785fd78a1848320e0b19js99f',   
        # The specific method called
        'method'    : 'GetNodeList',                        
        # The parameter list of specific method algorithm
        'args'      : [],                                   
        # Timestamp, in the unit of millisecond, is allowed to have 1 hour of time error both before and after the standard timestamp;the nonce must be greater than the nonce value of the last access 
        'nonce'     : 1516292399361,                        
        # Signature
        'sign'      : '085b63456c93hfb243a757366600f9c2'    
    }
    

    Setiap nama parameter dipisahkan oleh watak&, dan nama parameter dan nilai yang berkaitan dengan simbol=. URL permintaan lengkap (mengambilmethod=GetNodeListsebagai contoh):

    https://www.fmz.com/api/v1?
    access_key=8a1f6c3785fd78a1848320e0b19js99f&
    nonce=1516292399361&
    args=%5B%5D&
    sign=085b63456c93hfb243a757366600f9c2&
    version=1.0&
    method=GetNodeList
    

    Perhatikan bahawa tidak adasecret_keyAntara parameter permintaan.

  • Kaedah tandatangan Dalam parameter permintaan, parametersignadalah rentetan yang disulitkan, dan kaedah penyulitan adalah seperti berikut.

    Menurut format:

    version + "|" + method + "|" + args + "|" + nonce + "|" + secretKey
    

    Selepas menyambung tali, gunakanMD5algoritma penyulitan untuk menyulitkan rentetan dan menukarnya kepada nilai rentetan data hexadecimal, dirujuk kepada nilai parametersign.

    RujukanPythonKod bahagian tandatangan:

    # parameter
    d = {
        'version': '1.0',
        'access_key': accessKey,
        'method': method,
        'args': json.dumps(list(args)),
        'nonce': int(time.time() * 1000),
    }
    
    # Calculate "sign" signature (encrypted)
    d['sign'] = md5.md5(('%s|%s|%s|%d|%s' % (d['version'], d['method'], d['args'], d['nonce'], secretKey)).encode('utf-8')).hexdigest()
    

DapatkanNodeList()

GetNodeList()mengembalikan senarai pelabuhan akaun platform FMZ Quant Trading yang sepadan denganAPI KEYdalam permintaan.

  • Parameter Tiada

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            "result": {
                "nodes": [{
                    // Version number
                    "build": "3.3",                 
                    "date": "2018-01-19 10:35:24",
                    "id": 34500,
                    "ip": "126.28.21.120",
                    // Number of the bots running on this docker
                    "loaded": 1,                    
                    "name": "iZ9116xhkgtZ",
                    // Whether online
                    "online": true,                 
                    // Operation system
                    "os": "linux",                  
                    // Whether to enable offline alert
                    "wd": 0                         
                },
                ...
                ]
            },
            "error": null
        }
    }
    

GetRobotGroupList()

GetRobotGroupList()mengembalikan senarai pengelompokan bot akaun platform FMZ Quant Trading yang sepadan denganAPI KEYdalam permintaan.

  • Parameter Tiada

  • Nilai pulangan

    {
        "code":0,
        "data":{
            "result":{
                // All bot grouping information: group ID, group name 
                "items":[{"id":1122,"name":"test"}]
            },
            "error":null
        }
    }
    

GetPlatformList()

GetPlatformList()mengembalikan senarai bursa yang telah ditambah oleh akaun platform FMZ Quant Trading yang sepadan denganAPI KEYdalam permintaan.

  • Parameter Tiada

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            "result": {
                "platforms": [{
                    "eid": "Huobi",
                    "id": 12483,
                    // The label when adding a platform
                    "label": "huobi - test ETH/ETC",                            
                    "logo": "huobi.png",
                    "name": "huobi",
                    "stocks": ["LTC_BTC", "ETH_BTC", "ETC_BTC", "BCH_BTC"],
                    "website": "https://www.huobi.pro/"
                }, {
                    "eid": "AEX",
                    "id": 16345,
                    "label": "AEX",
                    "logo": "",
                    "name": "AEX",
                    "stocks": ["LTC_BTC", "ETH_BTC", "ETC_BTC", "BCC_BTC"],
                    "website": "https://www.aex.com/"
                },
                ...
                ]
            },
            "error": null
        }
    }
    

GetRobotList(...)

GetRobotList(offset, length, robotStatus, label)mengembalikan senarai robot akaun platform FMZ Quant Trading yang sepadan denganAPI KEYdalam permintaan.

  • Parameteroffset, lengthdanrobotStatusmempunyai jenis bilangan bulat, danlabeladalah jenis rentetan.

    • offset
    • length
    • robotStatus(Melalui -1 bermakna mendapat semua)
    • label(pelabelan tersuai; semua bot dengan label boleh dipalsukan)

    UntukPythoncontoh kod, merujuk kepada di atasKaedah pengesahan - Pengesahan Token, dan berikut adalahPythoncontoh panggilan:print api('GetRobotList', 'member2')cetak maklumat semua robot dengan label tersuaimember2. print api('GetRobotList', 0, 5, -1, 'member2')halaman dari 0 hingga 5 dan senarai sehingga 5 robot dilabelkan denganmember2.

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            "result": {
                "all": 53,
                "bots": [{
                    "date": "2017-12-25 09:29:27",
                    "end_time": "2017-12-28 17:44:21",
                    "id": 66054,
                    // If the value is 1, the bot is a virtual platform bot
                    "is_sandbox": 1,                                      
                    "name": "C++ test strategy",
                    "node_guid": "705d9aaaaaaaa93b49baaaaa787581cb087",
                    "profit": 0,
                    "public": 0,
                    "refresh": 151345645647000,
                    "start_time": "2017-12-28 17:44:15",
                    "status": 3,
                    "strategy_id": 65365,
                    "strategy_isowner": true,
                    "strategy_name": "C++  Version  Docker  API  Test Strategy(cryptocurrency futures and spot markets)",
                    "wd": 0
                }, ...
                ]
            },
            "error": null
        }
    }
    

CommandRobot (dalam bahasa Inggeris)

CommandRobot(RobotId, Cmd)antara muka menghantar arahan interaktif kepada robot yang sepadan (robotID: RobotId) daripadaAPI KEYdalam permintaan akaun FMZ Quant (perintah interaktif ditangkap olehGetCommand()API dipanggil dalam strategi dan pulangan).

  • ParameterRobotIdadalah jenis bilangan bulat, iaitu botID; Cmdadalah jenis rentetan, yang menghantar arahan interaktif kepada bot.

    • RobotId, botID, boleh diperolehi olehGetRobotList(...) interface.
    • Cmdadalah perintah interaktif yang dihantar kepada bot; perintah akan ditangkap oleh fungsiGetCommand(), yang mencetuskan logika interaktif dalam strategi (untuk merealisasikan logika interaktif dalam strategi, sila rujukGetCommand()fungsi dalam fail).
  • Nilai pulangan

    {
        // The API request was successfully executed
        "code": 0,                 
        "data": {
            // However, sending a command to a bot that is not running returns failure
            "result": false,       
            "error": null
        }
    }
    

StopRobot ((RobotId)

StopRobot(RobotId)berhenti menjalankan bot dengan ID yang ditentukan (robotID: RobotId), bersamaan denganAPI KEYdalam permintaan akaun FMZ Quant.

  • ParameterRobotIdadalah jenis bilangan bulat, iaitu botID, yang boleh diperolehi denganGetRobotList(...)antara muka;StopRobot(RobotId)Antara muka mengembalikan kod status robot yang dihentikan.

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            // 2 means stopping
            "result": 2,           
            "error": null
        }
    }
    

Mulakan semulaRobot(...)

RestartRobot(RobotId, Settings)mulakan semula robot dengan ID yang ditentukan (robotID: RobotId), bersamaan denganAPI KEYdalam permintaan akaun FMZ Quant.

Jika robot dicipta oleh API lanjutan, API lanjutanRestartRobot (RobotId, Settings)mesti digunakan untuk memulakan semula, danSettingsParameter mesti diluluskan. Robot yang dicipta di halaman platform boleh dimulakan semula melalui API yang diperluaskan atau dengan mengklik butang di halaman.Settingsparameter, atau hanya lulusRobotIdJika anda hanya lulus parameterRobotIdParameter, mulakan bot mengikut tetapan bot semasa.

  • Parameter

    • Tanpa mengkonfigurasi bot, parameter strategiSettings: RobotIdadalah jenis bilangan bulat; robotIDboleh diperolehi denganGetRobotList(...).

    • Dengan mengkonfigurasi bot, parameter strategiSettings: RobotIdadalah jenis bilangan bulat; botIDboleh diperolehi denganGetRobotList(...). Settingsadalah daripadaJSONJenis objek.

      SettingsFormat parameter seperti berikut:

      Settings = {
          "name": "hedge test",
          // Strategy parameter
          "args": [["Interval", 500]],            
          // Strategy ID, which can be obtained with "GetStrategyList" method
          "strategy": 25189,                      
          // K-line period parameter "60" means 60 seconds
          "period": 60,                           
          // Specify on which docker to run; if the attribute is not written, it will be automatically assigned to run
          "node" : 51924,                         
          // Custom field
          "appid": "member2",                     
          "exchanges": [
              // ZB; "pid" can be obtained by "GetPlatformList" method
              {"pid": 15445, "pair": "ETH_BTC"},     
              // OKEX; 2 exchange objects are configured
              {"pid": 13802, "pair": "BCH_BTC"},     
              
              // In addition to the platforms ("pid" identification) configured by the FMZ dashboard, you can also set exchange configuration information that has not been configured to operate the bot
              {"eid": "OKEX", "pair": "ETH_BTC", "meta" :{"AccessKey": "xxx", "SecretKey": "yyy"}},
              {"eid": "Huobi", "pair": "BCH_BTC", "meta" :{"AccessKey": "xxx", "SecretKey": "yyy"}}
          ]
      }
      

      Nota: Apabila anda menggunakan maklumat sensitif, seperti platformAPI KEY, termasuk"meta":{"AccessKey":"xxx","SecretKey":"yyy"}dalam konfigurasieid, anda harus tahu bahawa FMZ tidak menyimpan data. Data akan dihantar terus ke program docker, jadi maklumat ini mesti dikonfigurasi setiap kali bot dibuat atau dimulakan semula.

      Untuk memulakan semula bot yang menggunakan pemalam untuk menyokong pertukaran, apabila mengkonfigurasiSettingsparameter, anda harus membuat tetapan berikut untukexchangesatribut:

      {"eid": "Exchange", "label" : "testXXX", "pair": "ETH_BTC", "meta" :{"AccessKey": "123", "SecretKey": "1234", "Front" : "http://127.0.0.1:6666/XXX"}}
      

      labelatribut adalah untuk menetapkan label untuk objek pertukaran diakses oleh yang semasaProtokol am, yang boleh diperolehi olehexchange.GetLabel()fungsi dalam strategi.

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            // 1 means running
            "result": 1,          
            "error": null
        }
    }
    

GetRobotDetail(RobotId)

GetRobotDetail(RobotId)mendapat maklumat terperinci mengenai robot dengan ID yang ditentukan (robotID: RobotId), bersamaan denganAPI KEYdalam permintaan akaun platform Dagangan FMZ Quant.

  • ParameterRobotIdadalah jenis bilangan bulat; robotIDboleh diperolehi denganGetRobotList(...).

  • Nilai pulangan

    {
        "code": 0,
        "data": {
            "result": {
                "robot": {
                    // Next payment time, namely the effective cut-off time after the current payment
                    "charge_time": 1561992608,                                                  
                    // Elapsed Time
                    "charged": 3600,                                                            
                    // Amount consumed (0.125 CNY = 12500000 / 1e8)
                    "consumed": 12500000,                                                       
                    "date": "2019-07-01 21:50:08",
                    "debug": "{\"Nano\":1561989722431145193,\"Stderr\":\"\",\"Stdout\":\"\"}",  
                    // Stop time
                    "end_time": "2019-07-01 22:02:02",                                          
                    // The docker ID assigned when the robot is running; if it is automatic, the value is -1
                    "fixed_id": 85960,                                                          
                    "id": 150288,
                    "is_deleted": 0,
                    // Whether it has the permission to manage the bot
                    "is_manager": true,                                                         
                    // Whether it is virtual exchange 
                    "is_sandbox": 0,                                                            
                    // Robot name
                    "name": "Spread monitoring2",                                                         
                    // Docker ID
                    "node_id": 85960,                                                           
                    // The exchange objects configured by the robot
                    "pexchanges": {                                                             
                        // 14703 is eid, and "GateIO" is exchange name
                        "14703": "GateIO",                                                      
                        "15445": "ZB",
                        "42960": "OKEX",
                        "44314": "Huobi"
                    },
                    // label information of the exchange object configured by the robot
                    "plabels": {                                                                
                        "14703": "Gate.IO (old name: BTER)",
                        "15445": "ZB",
                        "42960": "OKEX spot V3 test",
                        "44314": "Huobi - newest test"
                    },
                    "profit": 0,
                    // Whether to show public
                    "public": 0,                                                                
                    // Recent active time
                    "refresh": 1561989724000,                                                   
                    "robot_args": "[[\"TickInterval\",500],[\"StrOnePair\",\"spot:Huobi:spot;spot:OKEX:spot;false;60;5;0;0\"],[\"StrTwoPair\",\"spot:ZB:spot;spot:GateIO:spot;false;60;5;0;0\"],[\"StrThreePair\",\"null\"],[\"StrFourPair\",\"null\"],[\"StrSixPair\",\"null\"],[\"StrFivePair\",\"null\"],[\"ResetChart\",false]]",
                    "start_time": "2019-07-01 22:00:54",
                    // Robot status
                    "status": 4,                                                                
                    "strategy_args": "[[\"TickInterval\",\"Detection frequency (ms)\",\"This is millisecond. Don't set it too small.\",500],[\"StrOnePair\",\"Combination1\",\"Spread Combination\",\"spot:Huobi:spot;spot:OKCoin:spot;false;60;5;0;0\"],[\"StrTwoPair\",\"Combination2\",\"Spread Combination\",\"future:Futures_OKCoin:this_week;spot:OKCoin:spot;false;60;5;0;0\"],[\"StrThreePair\",\"Combination3\",\"Spread Combination\",\"future:Futures_OKCoin:this_week;future:Futures_OKCoin:quarter;true;60;5;0;0\"],[\"StrFourPair\",\"Combination4\",\"Spread Combination\",\"null\"],[\"StrSixPair\",\"Combination6\",\"Combination\",\"null\"],[\"StrFivePair\",\"Combination5\",\"Combination\",\"null\"],[\"ResetChart\",\"whether to clear the previous chart\",\"clear the previous chart\",false]]",
                    // Configured exchange objects, set trading pair information
                    "strategy_exchange_pairs": "[60,[44314,42960,15445,14703],[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]]",
                    // Strategy ID
                    "strategy_id": 21337,                                                       
                    // Strategy's last modification time
                    "strategy_last_modified": "2018-11-29 12:07:58",                            
                    // Strategy name
                    "strategy_name": "Digital currency spread monitoring and analysis",                                       
                    "summary": "Polling time consuming: 500ms\n`[{\"type\":\"table\",\"title\":\"pair basic data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"UpdCycle\",\"isUSD\",\"Collect\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",60,false,\"612ms\"],[\"1 \",\"ZB/GateIO\",\"spot/spot\",60,false,\"501ms\"]]},{\"type\":\"table\",\"title\":\"pair market data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"A_Bids1\",\"B_Asks1\",\"Plus\",\"A_Asks1\",\"B_Bids1\",\"Minus\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",10518.02,10525.1,-7.08,10520,10523,-3],[\"1 \",\"ZB/GateIO\",\"spot/spot\",285.68,286,-0.32,285.8,285.85,-0.05]]},{\"type\":\"table\",\"title\":\"pair statistical data\",\"cols\":[\"ID\",\"NameA - NameB\",\"SymbolA - SymbolB\",\"Maximum spread\",\"Minimum spread\",\"Mean positive premium\",\"Mean negative premium\"],\"rows\":[[\"0 \",\"Huobi/OKEX\",\"spot/spot\",0,-3,0,-1.47],[\"1 \",\"ZB/GateIO\",\"spot/spot\",0.03,-0.05,0.03,-0.05]]}]`\n",
                    // Whether to enable offline alert
                    "wd": 0                                                                      
                }
            },
            "error": null
        }
    }
    

    Peraturansummaryatribut dalam data yang dikembalikan (maklumat pada bar status bot; dikemas kini dalam cache selama 10 saat; bukan data terkini) kini mempunyai had jumlah data (data dikemaskini); had jumlah data adalah 200KB, dan data yang berlebihan akan dipotong. Jika anda memerlukan lebih banyak data maklumat bar status, anda boleh menggunakanGetRobotLogsantara muka untuk mendapatkan (apabilaGetRobotLogsmendapatkan maklumat bar status, medansummaryadalah data terkini).

    Penerangan atributstrategy_exchange_pairs, mengambil data berikut sebagai contoh:

    [60,[44314,42960,15445,14703],[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]]
    

    Data pertama60mewakili tempoh K-line lalai yang ditetapkan oleh bot adalah 1 minit, iaitu 60 saat.

    [44314,42960,15445,14703]adalah objek pertukaraneiddikonfigurasi untuk bot (mengikut urutan penambahan).[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]adalah pasangan dagangan yang ditetapkan untuk objek pertukaran yang dikonfigurasikan oleh bot (dalam urutan penambahan dan dalam satu-ke-satu perhubungan denganeid).

DapatkanAkaun ((()

GetAccount()mengembalikan maklumat akaun yang sepadan denganAPI KEYdalam permintaan akaun platform Dagangan FMZ Quant.

  • Parameter Tiada

  • Nilai pulangan

    {
        "code": 0, 
        "data": {
            "result": {
                "username": "littlelittledream",
                "level": 0,
                "consumed": 3235500000,
                "invitation_code": "1545967",
                "points": 25,
                // The value here, due to precision control, is expressed in integer. To convert it to actual value, you need to divide it by 1e8 (i.e. 10 to the 8th power), and the actual result here is: 65.421
                "balance": 6542100000               
            },
            "error": None
        }
    }
    

Dapatkan


Lebih lanjut