UDP Interface

General Information

Sierra Chart uses a UDP socket interface to receive short text messages to perform a few simple actions which are documented below.

All of this can be done from an external program using this interface.

To use the UDP interface, create a UDP socket and send a text message to the default port of 22903 at the IP address where Sierra Chart is running. Usually this will just be the localhost which is

The port number can be changed through Global Settings >> Data/Trade Service Settings >> SC Server Settings >> UDP Port.

Using UDP protocol is quite simple and supported by most any programming language.

Opening Chart or Activating a Chart

If you want to open a chart for a symbol or activate an existing chart for a particular symbol, then send a text string to the UDP port using the following format:

Symbol.dly (for Historical Daily charts)
Symbol.scid (for Intraday charts)



Opening or Activating a Chartbook

If you want to open a Chartbook or activate an existing open Chartbook, then use the following UDP request string:

OPEN_CHARTBOOK--Chartbook Name.cht



Exit Program

To exit from Sierra Chart, use the following UDP string:


This causes Sierra Chart to go through the same process as the menu command File >> Exit.

Requesting a Chart Image for Image Serving

It is supported to open a chart or activate an existing chart and save an image of that chart to a file.

One application for this interface is to use Sierra Chart as chart image server for a website. Sierra Chart is very capable of running in a server environment and it is extensively used by us on our servers.

For this command, use the following UDP request format:


Each element in this message is separated with -- characters.

Definition of each of the message elements:

  • IMAGE_REQUEST: This is the actual text string command to use to make an image request.
  • Symbol.Extension: This is the symbol that you want to open a chart for. The extension indicates the type. The file extension can be dly (Historical Daily chart) or scid (Intraday chart). Example ABC.scid
  • Width: The width of the image in pixels.
  • Height: The height of the image in pixels.
  • Number of Bars: The number of chart bars in the image. The spacing of the bars in the chart will be adjusted to meet this specification.
  • OutputPathandFileName: The output path and file name for the image file. The output file extension determines the format. The file extension can be BMP, JPG or PNG. PNG is recommended because it is lossless and compact.




#include <stdio.h>
#include "winsock2.h"

void main() 
    WSADATA wsaData;
    SOCKET SendSocket;
    sockaddr_in RecvAddr;
    int Port = 22903;

    char SendBuf[128] = "IMAGE_REQUEST--ES#.dly--640--480--20--C:\\temp\\image.png";
    int BufLen = 128;

    // Initialize Winsock
    WSAStartup(MAKEWORD(2,2), &wsaData);

    // Create a socket for sending data

    SendSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

    // Set up the RecvAddr structure with the IP address of
    // the receiver (in this example case "123.456.789.1")
    // and the specified port number.
    RecvAddr.sin_family = AF_INET;
    RecvAddr.sin_port = htons(Port);

    RecvAddr.sin_addr.s_addr = inet_addr("");

    // Send a datagram to the receiver

    printf("Sending a datagram to the receiver...\n");
            (SOCKADDR *) &RecvAddr, 

    // When the application is finished sending, close the socket.
    printf("Finished sending. Closing socket.\n");

    // Clean up and quit.


*Last modified Friday, 22nd July, 2016.