Overview
Welcome to MidChains API documentation. These documents outline trading platform functionality, market details, and APIs.
APIs are separated into two categories: Market data feed and trading. Feed APIs provide market data and are public. Trading APIs require authentication and provide access to placing orders and other account information.
Version: 1.0.0
Time Format
The MidChains API timestamp fields us the Epoch/POSIX format for WebSocket API Requests. Unix and POSIX measure time as the number of seconds that have passed since 1 January 1970 00:00:00 UTC
Do not provide miliseconds. ‘1614331055’ or ‘1614331055000’ are supported. ‘1614331055123’ is not supported.
"time": "1614331055000"
"time": "1614331055000"
"time": "1614331055000"
"time": "1614331055000"
Message Header
Tag | Field Name | Required | Note |
---|---|---|---|
8 | BeginString | Yes | FIX.4.2 |
9 | BodyLength | Yes | (Always unencrypted, must be second field in message) |
35 | MsgType | Yes | (Always unencrypted, must be third field in message) |
49 | SenderCompID | Yes | Provided by MidChains |
56 | TargetCompID | Yes | Provided by MidChains |
34 | MsgSeqNum | Yes | (Can be embedded within encrypted data section.) |
52 | SendingTime | Yes | Required |
Message Trailer
Tag | Field Name | Required | Note |
---|---|---|---|
10 | CheckSum | Yes | (Always unencrypted, always last field in message) |
Login (A)
The logon message identifies and authenticates the user or member and establishes a connection to the FIX Gateway. The FIX gateway accepts Logon messages as per the FIX specification. Further, the FIX gateway supports the logon sequence required for session authentication. After a successful logon as described in the specification the FIX gateway will: Initiate retransmission processing via a resend request if the Logon sequence number is greater than the value expected Initiate logout processing via a Logout message with an appropriate error message, then waits for a confirming Logout before disconnecting if the Logon sequence number is less than expected. If the confirming Logout has not been received within a short period of time the session will be disconnected. Handle retransmission requests. Initiate a Logon using the SenderCompID in the message header. Will forwarded to the FIX client messages that are waiting in the outbound queue Begin regular message communication.
Tag | Field Name | Required | Note |
---|---|---|---|
Standard Header | Yes | MsgType = A | |
108 | HeartBtInt | Yes | |
Standard Trailer | Yes |
Example Message Client 8=FIX.4.2^A9=70^A35=A^A34=2^A49=SENDERCOMP^A52=20210714-01:01:10.569^A56=MIDCDEV1^A98=0^A108=60^A10=049^A Gateway 8=FIX.4.2^A9=72^A35=A^A49=MIDCDEV1^A56=YOURSENDCOMD^A34=422^A52=20210714-07:52:46.306^A98=0^A108=60^A10=163^A
Example Message Client 8=FIX.4.2^A9=70^A35=A^A34=2^A49=SENDERCOMP^A52=20210714-01:01:10.569^A56=MIDCDEV1^A98=0^A108=60^A10=049^A Gateway 8=FIX.4.2^A9=72^A35=A^A49=MIDCDEV1^A56=YOURSENDCOMD^A34=422^A52=20210714-07:52:46.306^A98=0^A108=60^A10=163^A
Example Message Client 8=FIX.4.2^A9=70^A35=A^A34=2^A49=SENDERCOMP^A52=20210714-01:01:10.569^A56=MIDCDEV1^A98=0^A108=60^A10=049^A Gateway 8=FIX.4.2^A9=72^A35=A^A49=MIDCDEV1^A56=YOURSENDCOMD^A34=422^A52=20210714-07:52:46.306^A98=0^A108=60^A10=163^A
Example Message Client 8=FIX.4.2^A9=70^A35=A^A34=2^A49=SENDERCOMP^A52=20210714-01:01:10.569^A56=MIDCDEV1^A98=0^A108=60^A10=049^A Gateway 8=FIX.4.2^A9=72^A35=A^A49=MIDCDEV1^A56=YOURSENDCOMD^A34=422^A52=20210714-07:52:46.306^A98=0^A108=60^A10=163^A