Sumber daya yang dimuat... Pemuatan...

Instruksi API FMZ

Penulis:Tidak ada, Dibuat: 2020-04-20 10:19:00, Diperbarui: 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() + "`");
    }
    

Indikator Fungsi di Perpustakaan Talib

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

Contoh kode untuk panggilanCCIindikator:

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:

    Indikator Deskripsi
    CDL2CROWS Dua Burung gagak
    CDL2CROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3BLACKCROWS Tiga gagak hitam
    CDL3BLACKCROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3 DI BAHAN Tiga di dalam atas/bawah
    CDL3INSIDE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3LINESTRIKE Serangan Tiga Baris
    CDL3LINESTRIKE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3 diluar Tiga di luar atas/bawah
    CDL3OUTSIDE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3 Bintang Selatan Tiga Bintang di Selatan
    CDL3STARSINSOUTH ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL3Tentara Putih Tiga Prajurit Putih yang Melangkah
    CDL3WHITESOLDIERS ((Rekaman [Buka, Tinggi, Rendah, Tutup]) = Array ((outInteger)
    CDLABANDONEDBABY Bayi yang Ditinggalkan
    CDLABANDONEDBABY ((Records[Open,High,Low,Close],Penetration = 0.3) = Array ((outInteger)
    CDLADVANCEBLOCK Blok Advance
    CDLADVANCEBLOCK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLBELTHOLD Tahan sabuk
    CDLBELTHOLD ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLBREAKAWAY Perpisahan
    CDLBREAKAWAY ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLClosingMarubozu Menutup Marubozu
    CDLCLOSINGMARUBOZU ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLCONCEALBABYSWALL Menyembunyikan Bayi Swallow
    CDLCONCEALBABYSWALL ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLkontra serangan Kontra serangan
    CDLCOUNTERATTACK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLDARKCLOUDCOVER Tutupan Awan Gelap
    CDLDARKCLOUDCOVER ((Records[Open,High,Low,Close],Penetrasi = 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 Dragonfly Doji
    CDLDRAGONFLYDOJI ((Rekaman [Buka, Tinggi, Rendah, Tutup]) = Array ((outInteger)
    CDLENGULFING Pola 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)
    CDLGAPSIDESIDEBLANK Garis-garis putih berdekatan atas/bawah
    CDLGAPSIDESIDESWHITE ((Rekaman [Buka, Tinggi, Rendah, Tutup]) = Array ((outInteger)
    CDLGRAVESTONEDOJI Doji batu nisan
    CDLGRAVESTONEDOJI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHAMMER Palu
    CDLHAMMER ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHANGINGMAN Orang yang digantung
    CDLHANGINGMAN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHARAMI Pola Harami
    CDLHARAMI ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHARAMICROSS Pola Palang 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 Pola Hikkake yang Dimodifikasi
    CDLHIKKAKEMOD ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLHOMINGPIGEON Burung Merpati
    CDLHOMINGPIGEON ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLIDENTICAL3CROWS Tiga Burung gagak yang sama
    CDLIDENTICAL3CROWS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLINNECK Pola di leher
    CDLINNECK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLINVERTEDHAMMER (dalam bahasa Inggris). Palu terbalik
    CDLINVERTEDHAMMER ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLKICK Menendang
    CDLKICKING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLKICKINGBYLENGTH Menendang - banteng/beruang ditentukan oleh marubozu yang lebih panjang
    CDLKICKINGBYLENGTH ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLLADDERBOTTOM Bagian bawah tangga
    CDLLADDERBOTTOM ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLLONGLEGGEDDOJI (dalam bahasa Inggris). Dojz Berkaki Panjang
    CDLLONGLEGGEDDOJI ((Rekaman [Buka, Tinggi, Rendah, Tutup]) = Array ((outInteger)
    CDLLONGLINE Lilin Lintang
    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 Pola di leher
    CDLONNECK ((Records[Open,High,Low,Close]) = Array ((outInteger)
    PEMBANGUNAN Pola Penembusan
    CDLPIERCING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLRICKSHAWMAN Pria rickshaw
    CDLRICKSHAWMAN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLRISEFALL3METHODS Tiga Metode Naik/Jatuh
    CDLRISEFALL3METHODS ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL Pembagian garis Garis Pembagian
    CDLSEPARATINGLINES ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLShootingSTAR Bintang Menembak
    CDLSHOOTINGSTAR ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSORTLINE Lilin Singkat Lilin
    CDLSHORTLINE ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDL SPINNINGTOP Spinning Top
    CDLSPINNINGTOP ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSTALLEDPATTERN Pola yang terhambat
    CDLSTALLEDPATTERN ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLSTICKSANDWICH Sandwich 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 Tasuki Gap
    CDLTASUKIGAP ((Rekaman [Buka, Tinggi, Rendah, Tutup]) = Array ((outInteger)
    CDLTHRUSTING Pola Mendorong
    CDLTHRUSTING ((Records[Open,High,Low,Close]) = Array ((outInteger)
    CDLTRISTAR Pola 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 Kesenjangan Ke atas/Kebawah Tiga Metode
    CDLXSIDEGAP3METHODS ((Records[Open,High,Low,Close]) = Array ((outInteger)
  • Volume Indicators:

    Indikator Deskripsi
    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 Pada Volume Saldo
    OBV ((Records[Close],Records[Volume]) = Array ((outReal)
  • Math Transform:

    Indikator Deskripsi
    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 Lantai atas vektor
    CEIL ((Records[Close]) = Array ((outReal)
    COS Kos Trigonometri Vektor
    COS ((Records[Close]) = Array ((outReal)
    COSH Vektor Trigonometri Cosh
    COSH ((Records[Close]) = Array ((outReal)
    Ekspirasi Vektor Aritmatika Exp
    EXP ((Records[Close]) = Array ((outReal)
    Lantai Lantai Vektor
    FLOOR ((Records[Close]) = Array ((outReal)
    LN Vektor Log Natural
    LN ((Records[Close]) = Array ((outReal)
    LOG10 Vektor Log10
    LOG10 ((Records[Close]) = Array ((outReal)
    SIN Vektor Trigonometri Sin
    SIN ((Records[Close]) = Array ((outReal)
    SINH Vektor Trigonometri Sinh
    SINH ((Records[Close]) = Array ((outReal)
    SQRT Akar Kuadrat Vektor
    SQRT ((Records[Close]) = Array ((outReal)
    TAN Vektor Trigonometri Tan
    TAN ((Records[Close]) = Array ((outReal)
    Tan Vektor Trigonometri Tanh
    TANH ((Records[Close]) = Array ((outReal)
  • Math Operators:

    Indikator Deskripsi
    Maksimal Nilai tertinggi selama periode tertentu
    MAX ((Records[Close],Time Period = 30) = Array ((outReal)
    MAXINDEX Indeks dengan nilai tertinggi selama periode tertentu
    MAXINDEX ((Records[Close],Time Period = 30) = Array ((outInteger)
    MIN Nilai terendah selama periode tertentu
    MIN ((Records[Close],Time Period = 30) = Array ((outReal)
    MININDEX Indeks nilai terendah selama periode tertentu
    MININDEX ((Records[Close],Time Period = 30) = Array ((outInteger)
    MINMAX Nilai terendah dan tertinggi selama periode tertentu
    MINMAX ((Records[Close],Time Period = 30) = [Array ((outMin),Array ((outMax) ]
    MINMAXINDEX Indeks nilai terendah dan tertinggi selama periode tertentu
    MINMAXINDEX ((Records[Close],Time Period = 30) = [Array ((outMinIdx),Array ((outMaxIdx) ]
    SUM Ringkasan
    SUM ((Records[Close],Time Period = 30) = Array ((outReal)
  • Cycle Indicators:

    Indikator Deskripsi
    HT_DCPERIOD Transformasi Hilbert - Periode Siklus Dominan
    HT_DCPERIOD ((Records[Close]) = Array ((outReal)
    HT_DCPHASE Transformasi Hilbert - Fase Siklus 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 Transformasi Hilbert - Trend vs Mode Siklus
    HT_TRENDMODE ((Records[Close]) = Array ((outInteger)
  • Volatility Indicators:

    Indikator Deskripsi
    ATR Rentang Rata-rata Benar
    ATR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    NATR Jangkauan Benar Rata-rata yang Normal
    NATR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    TRANGE Jangkauan Nyata
    TRANGE ((Records[High,Low,Close]) = Array ((outReal)
  • Overlap Studies:

    Indikator Deskripsi
    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 Rata-rata Bergerak Eksponensial Ganda
    DEMA ((Records[Close],Time Period = 30) = Array ((outReal)
    EMA Rata-rata Bergerak Eksponensial
    EMA ((Records[Close],Time Period = 30) = Array ((outReal)
    HT_TRENDLINE Transformasi Hilbert - Instan Trendline
    HT_TRENDLINE ((Records[Close]) = Array ((outReal)
    KAMA Kaufman Adaptive Moving Average
    KAMA ((Records[Close],Time Period = 30) = Array ((outReal)
    MA Rata-rata bergerak
    MA ((Records[Close],Time Period = 30, MA Type = 0) = Array ((outReal)
    Ibu MESA Adaptive Moving Average
    MAMA ((Records[Close],Fast Limit = 0.5,Slow Limit = 0.05) = [Array ((outMAMA),Array ((outFAMA) ]
    Titik tengah Titik tengah dari periode
    MIDPOINT ((Records[Close],Time Period = 14) = Array ((outReal)
    Harga rata-rata Harga titik tengah selama periode
    MIDPRICE ((Records[High,Low],Time Period = 14) = Array ((outReal)
    SAR SAR parabola
    SAR ((Records[High,Low],Acceleration Factor = 0.02,AF Maximum = 0.2) = Array ((outReal)
    SAREXT SAR Parabolik - diperpanjang
    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 Rata-rata Bergerak Sederhana
    SMA ((Records[Close],Time Period = 30) = Array ((outReal)
    T3 Triple Exponential Moving Average (T3)
    T3 ((Records[Close],Time Period = 5,Volume Factor = 0.7) = Array ((outReal)
    TEMA Triple Exponential Moving Average
    TEMA ((Records[Close],Time Period = 30) = Array ((outReal)
    TRIMA Rata-rata Gerak Segitiga
    TRIMA ((Records[Close],Time Period = 30) = Array ((outReal)
    WMA Rata-rata Bergerak Bertimbang
    WMA ((Records[Close],Time Period = 30) = Array ((outReal)
  • Statistic Functions:

    Indikator Deskripsi
    LINEARREG Regresi linier
    LINEARREG ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_ANGLE Sudut Regresi Linear
    LINEARREG_ANGLE ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_INTERCEPT Linear Regression Intercept
    LINEARREG_INTERCEPT ((Records[Close],Time Period = 14) = Array ((outReal)
    LINEARREG_SLOPE Kemiringan Regresi Linear
    LINEARREG_SLOPE ((Records[Close],Time Period = 14) = Array ((outReal)
    STDDEV Penyimpangan Standar
    STDDEV ((Records[Close],Time Period = 5, Deviations = 1) = Array ((outReal)
    TSF Ramalan Seri Waktu
    TSF ((Records[Close],Time Period = 14) = Array ((outReal)
    VAR Variansi
    VAR ((Records[Close],Time Period = 5, Deviations = 1) = Array ((outReal)
  • Momentum Indicators:

    Indikator Deskripsi
    ADX Indeks Gerakan Arah Rata-rata
    ADX ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    ADXR Rata-rata Indeks Gerakan Arah Peringkat
    ADXR ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    APO Osilator Harga Absolute
    APO ((Records[Close],Periode cepat = 12,Periode lambat = 26,MA Tipe = 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 Kekuatan
    BOP ((Records[Open, High, Low, Close]) = Array ((outReal)
    CCI Indeks Saluran Komoditas
    CCI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    CMO Chande Momentum Oscillator
    CMO ((Records[Close],Time Period = 14) = Array ((outReal)
    DX Indeks Gerakan 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 dapat dikontrol
    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 Konvergensi/Divergensi Rata-rata yang Bergerak 12/26
    MACDFIX ((Records[Close],Signal Period = 9) = [Array ((outMACD),Array ((outMACDSignal),Array ((outMACDHist) ]
    MFI Indeks Aliran Uang
    MFI ((Records[High,Low,Close,Volume],Time Period = 14) = Array ((outReal)
    MINUS_DI Indikator arah minus
    MINUS_DI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    MINUS_DM Minus Gerakan arah
    MINUS_DM ((Records[High,Low],Time Period = 14) = Array ((outReal)
    Ibu Momentum
    MOM ((Records[Close],Time Period = 10) = Array ((outReal)
    PLUS_DI Plus Indikator Arah
    PLUS_DI ((Records[High,Low,Close],Time Period = 14) = Array ((outReal)
    PLUS_DM Plus Gerakan arah
    PLUS_DM(Records[High,Low],Time Period = 14) = Array ((outReal)
    PPO Osilator Harga Persentase
    PPO ((Records[Close],Fast Period = 12,Slow Period = 26,MA Type = 0) = Array ((outReal)
    ROC Tingkat perubahan: ((harga/prevPrice) -1) * 100
    ROC ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCP Tingkat perubahan Persentase: (harga-prevPrice)/prevPrice
    ROCP ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCR Rasio tingkat perubahan: (harga/prevPrice)
    ROCR ((Records[Close],Time Period = 10) = Array ((outReal)
    ROCR100 Rasio tingkat perubahan skala 100: (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 Stochastic Fast
    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 dari EMA Triple Smooth
    TRIX ((Records[Close],Time Period = 30) = Array ((outReal)
    ULTOSC Ultimate Oscillator
    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:

    Indikator Deskripsi
    AVGPRICE Harga Rata-rata
    AVGPRICE ((Records[Open,High,Low,Close]) = Array ((outReal)
    Harga Harga rata-rata
    MEDPRICE ((Records[High,Low]) = Array ((outReal)
    TYPE PRICE Harga Tipikal
    TYPPRICE ((Records[High,Low,Close]) = Array ((outReal)
    WCLPRICE Harga Penutupan Tertimbang
    WCLPRICE ((Records[High,Low,Close]) = Array ((outReal)

Data Dasar

Platform FMZ Quant Trading mendukung backtesting dan querying berbagai data fundamental di bot. Data fundamental disediakan secara real time oleh pusat data platform FMZ Quant Trading, dan pusat data akan terus mengumpulkan dan meringkas berbagai data fundamental.

Data Invokasi

Penggunaanexchange.GetData(Source)fungsi untuk mendapatkan data dasar. Data dasar cryptocurrency belum dikumpulkan sementara.

Format data

Data dasar cryptocurrency belum dikumpulkan sementara.

Perpanjangan API Platform FMZ

Platform FMZ Quant Trading mendukung program invocation dari berbagai fungsi Platform, dan telah membuka API yang diperluas.

Ini mendukung ekstensi manajemen otoritas API, seperti yang ditunjukkan pada gambar:

img

Hal ini memungkinkan yang baru ditambahkanAPI KEYAnda bisa masuk*dalam kotak input izin API untuk membuka semua izin antarmuka. Tentukan izin antarmuka tertentu, dan masukkan nama fungsi API yang ditingkatkan yang sesuai, dipisahkan dengan koma, sepertiGetRobotDetail, DeleteRobot, yaitu, berikan iniAPI KEYizin untukmendapatkan antarmuka bot informasi rincidanhapus antarmuka bot.

Buat ApiKey

img

Kode Kembali API

Deskripsi Kode
Eksekusi yang sukses 0
Kunci API yang salah 1
Tanda tangan yang salah 2
Kesalahan nonce 3
Metode yang salah 4
Parameter yang salah 5
Kesalahan internal yang tidak diketahui 6

Status bot

(Mulai normal)

Status Kode
Tidak aktif 0
Dalam operasi 1
Berhenti 2
Ditandatangani keluar 3
Berhenti 4
Strategi ini memiliki kesalahan. 5

(tidak normal)

Status Kode
Strategi telah berakhir, dan silakan hubungi penulis untuk membelinya lagi -1
Tidak ada docker yang ditemukan -2
Kesalahan kompilasi strategi -3
Robot sudah berjalan. -4
Saldo yang tidak cukup -5
Jumlah strategi bersamaan melebihi batas -6

Cara Pemeriksaan

Verifikasi Token

Penggunaanmd5metode enkripsi untuk diverifikasi.

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)
}

Verifikasi Langsung

Ini mendukung verifikasi tanpatoken(lalu)secret_keyMisalnya URL yang langsung memberikan instruksi interaktif ke bot, yang dapat digunakan untukTradingViewatauWebHookCallback dalam kasus lain. UntukCommandRobot(RobotId, Cmd)fungsi, parameternoncetidak memerlukan verifikasi, dan frekuensi akses dan waktu kunjungan antarmuka tidak terbatas.

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

Dalam keadaan bahwa verifikasi langsung didukung, hanyaCommandRobotantarmuka didukung untuk mendapatkanBodydata dalam permintaan.WebHook URLdariTradingView:

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

Perhatikan pengaturan sesuai dengan format berikut:args=[130350,+""], di mana130350Apakah botIDdari FMZ Quant Trading platform.

Pengaturan di kotak pesan (data Body yang diminta untuk dikirim):

  • Format JSON

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

    Robot denganIDdari186515dapat menerima instruksi interaktif:{"close": 39773.75, "name": "aaa"}.

  • Format teks:

    BTCUSDTPERP Crossing 39700.00 close: {{close}}
    

    Robot denganIDdari186515dapat menerima instruksi interaktif:BTCUSDTPERP Crossing 39700.00 close: 39739.4.

Contoh dariPython & 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 diperluas pada FMZ Quant untuk mewujudkan TradingView perdagangan sinyal peringatan

Penjelasan API yang diperluas

  • API diperluas dari platform FMZ Quant Trading

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

    Simbol di atas?diikuti oleh parameter permintaan.

    Parameter permintaan yang dijelaskan 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 karakter&, dan nama parameter dan nilai yang terkait 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 bahwa tidak adasecret_keydi antara parameter permintaan.

  • Metode tanda tangan Dalam parameter permintaan, parametersignadalah string terenkripsi, dan metode enkripsi adalah sebagai berikut.

    Menurut format:

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

    Setelah mengikat string, gunakanMD5algoritma enkripsi untuk mengenkripsi string dan mengubahnya menjadi nilai string data heksadesimal, disebut nilai parametersign.

    ReferensiPythonkode bagian tanda tangan:

    # 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 daftar docker dari akun platform Trading FMZ Quant yang sesuai denganAPI KEYdalam permintaan.

  • Parameter Tidak ada

  • Nilai kembali

    {
        "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 daftar pengelompokan bot dari akun platform Trading FMZ Quant yang sesuai denganAPI KEYdalam permintaan.

  • Parameter Tidak ada

  • Nilai kembali

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

DapatkanPlatformList()

GetPlatformList()mengembalikan daftar bursa yang telah ditambahkan oleh akun platform Trading FMZ Quant yang sesuai denganAPI KEYdalam permintaan.

  • Parameter Tidak ada

  • Nilai kembali

    {
        "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 daftar robot dari akun platform Trading FMZ Quant yang sesuai denganAPI KEYdalam permintaan.

  • Parameteroffset, lengthdanrobotStatusmemiliki jenis bilangan bulat, danlabeladalah jenis string.

    • offset
    • length
    • robotStatus(Melalui -1 berarti mendapatkan semua)
    • label(label kustom; semua bot dengan label dapat digoda)

    UntukPythoncontoh kode, lihat di atasMetode verifikasi - Verifikasi Token, dan berikut adalahPythoncontoh panggilan:print api('GetRobotList', 'member2')cetak informasi dari semua robot dengan label khususmember2. print api('GetRobotList', 0, 5, -1, 'member2')halaman dari 0 sampai 5 dan daftar hingga 5 robot berlabel denganmember2.

  • Nilai kembali

    {
        "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 Inggris)

CommandRobot(RobotId, Cmd)antarmuka mengirim perintah interaktif ke robot yang sesuai (robotID: RobotId) dariAPI KEYdalam permintaan akun FMZ Quant (perintah interaktif ditangkap olehGetCommand()API disebut dalam strategi dan kembali).

  • ParameterRobotIdadalah dari jenis bilangan bulat, yaitu botID; Cmdadalah jenis string, yang mengirim perintah interaktif ke bot.

    • RobotId, botID, dapat diperoleh olehGetRobotList(...) interface.
    • Cmdadalah perintah interaktif yang dikirim ke bot; perintah akan ditangkap oleh fungsiGetCommand(), yang memicu logika interaktif dalam strategi (untuk mewujudkan logika interaktif dalam strategi, silakan lihatGetCommand()fungsi dalam file).
  • Nilai kembali

    {
        // 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), yang sesuai denganAPI KEYdalam permintaan akun FMZ Quant.

  • ParameterRobotIdadalah dari jenis bilangan bulat, yaitu botID, yang dapat diperoleh denganGetRobotList(...)antarmukaStopRobot(RobotId)antarmuka mengembalikan kode status robot yang dihentikan.

  • Nilai kembali

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

RestartRobot ((...)

RestartRobot(RobotId, Settings)memulai kembali robot dengan ID yang ditentukan (robotID: RobotId), yang sesuai denganAPI KEYdalam permintaan akun FMZ Quant.

Jika robot dibuat oleh API diperpanjang, API diperpanjangRestartRobot (RobotId, Settings)harus digunakan untuk memulai kembali, danSettingsParameter harus dilewati. Robot yang dibuat di halaman platform dapat dihidupkan kembali melalui API yang diperluas atau dengan mengklik tombol di halaman.SettingsParameter, atau hanya lulusRobotIdJika Anda hanya melewatiRobotIdParameter, mulai bot sesuai dengan pengaturan bot saat ini.

  • Parameter

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

    • Dengan mengkonfigurasi bot, parameter strategiSettings: RobotIdadalah jenis bilangan bulat; botIDdapat diperoleh denganGetRobotList(...). Settingsadalah dariJSONtipe objek.

      Settingsformat parameter sebagai 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"}}
          ]
      }
      

      Catatan: Ketika Anda menggunakan informasi sensitif, seperti platformAPI KEY, termasuk"meta":{"AccessKey":"xxx","SecretKey":"yyy"}dalam konfigurasieid, Anda harus tahu bahwa FMZ tidak menyimpan data. Data akan dikirim langsung ke program docker, sehingga informasi ini harus dikonfigurasi setiap kali bot dibuat atau di-restart.

      Untuk memulai kembali bot yang menggunakan plugin untuk mendukung pertukaran, ketika mengkonfigurasiSettingsparameter, Anda harus membuat pengaturan berikut untukexchangesatribut:

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

      labelAtribut ini adalah untuk mengatur label untuk objek pertukaran diakses olehprotokol umum, yang dapat diperoleh denganexchange.GetLabel()fungsi dalam strategi.

  • Nilai kembali

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

GetRobotDetail ((RobotId))

GetRobotDetail(RobotId)mendapatkan informasi rinci tentang robot dengan ID yang ditentukan (robotID: RobotId), yang sesuai denganAPI KEYdalam permintaan akun platform perdagangan FMZ Quant.

  • ParameterRobotIdadalah jenis bilangan bulat; robotIDdapat diperoleh denganGetRobotList(...).

  • Nilai kembali

    {
        "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 (informasi pada bilah status bot; di-cache selama 10 detik; bukan data terbaru) saat ini memiliki batas jumlah data (data yang di-cache); batas jumlah data adalah 200KB, dan data berlebih akan dipotong.GetRobotLogsantarmuka untuk mendapatkan (ketikaGetRobotLogsmendapatkan informasi dari status bar, bidangsummaryadalah data terbaru).

    Deskripsi atribut daristrategy_exchange_pairs, contoh data berikut:

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

    Data pertama60mewakili periode K-line default yang ditetapkan oleh bot adalah 1 menit, yaitu 60 detik.

    [44314,42960,15445,14703]adalah objek pertukaraneiddikonfigurasi untuk bot (menurut urutan penjumlahan).[\"BTC_USDT\",\"BTC_USDT\",\"ETH_USDT\",\"ETH_USDT\"]adalah pasangan perdagangan yang ditetapkan untuk objek pertukaran yang dikonfigurasi oleh bot (dalam urutan penjumlahan dan dalam korespondensi satu-ke-satu denganeid).

DapatkanAkun ((()

GetAccount()mengembalikan informasi akun yang sesuai denganAPI KEYdalam permintaan akun platform perdagangan FMZ Quant.

  • Parameter Tidak ada

  • Nilai kembali

    {
        "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 banyak